Image processing system and method for natural gas pipeline leakage detection

By collecting and analyzing infrared images of natural gas pipelines and generating visual leakage area images, the problem of difficulty in identifying leakage areas in existing technologies is solved, and high-precision leakage detection and quantitative evaluation are achieved.

CN120833338AActive Publication Date: 2025-10-24BEIJING INST OF TECH

Patent Information

Application Number
CN202511340511.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-10-24
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

Existing natural gas pipeline leak detection methods are difficult to achieve high-precision and rapid identification of leakage areas, especially in the quantitative assessment of leakage areas and judgment of leakage levels, and are unable to provide effective support.

Method used

By collecting infrared images of natural gas pipelines, extracting pipeline temperature and boundary features, and generating natural gas leakage diffusion layers, the thermal friction diffusion vector is used to generate leakage point and area images, and the flow pressure is combined to generate a visual leakage area image.

Benefits of technology

It realizes the visual expression of the leakage range of natural gas pipelines, improves the accuracy and reliability of leak detection, and supports leakage level judgment and emergency response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120833338A_ABST
    Figure CN120833338A_ABST
Patent Text Reader

Abstract

The invention provides an image processing system and method for natural gas pipeline leakage detection, and the method comprises the steps: firstly collecting a natural gas pipeline infrared image, and extracting pipeline boundary features according to the natural gas pipeline image; performing layer feature extraction on the natural gas pipeline infrared image according to the pipeline boundary features to obtain a natural gas leakage diffusion layer of the natural gas pipeline infrared image; performing thermal friction diffusion vector extraction according to the natural gas leakage diffusion layer to obtain a thermal friction diffusion vector set, and generating a pipeline leakage point position image through the thermal friction diffusion vector set; the diffusion characteristic quantity corresponding to each pipeline leakage point in the pipeline leakage point position image is extracted, and a pipeline leakage area image is generated through the natural gas pipeline flow pressure and the diffusion characteristic quantity corresponding to each pipeline leakage point; the friction heat effect between the high-pressure natural gas and the natural gas pipeline leakage opening can be analyzed according to the heat friction diffusion vector, and therefore a visual pipeline leakage area image is generated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and more particularly, to an image processing system and method for natural gas pipeline leakage detection. BACKGROUND

[0002] For long-distance natural gas pipelines, pipeline leakage can cause soil, water and air pollution, and thus affect the ecological environment and human health. In addition, pipeline leakage can also cause natural gas production to be interrupted, resulting in serious economic losses. From a safety perspective, leakage incidents can cause fires, explosions and other safety accidents, which seriously threaten the lives and property safety of workers and surrounding residents. Therefore, it is particularly important to detect and warn long-distance natural gas pipeline leakage with high precision and fast response.

[0003] In existing natural gas pipeline leakage detection methods, image information of the natural gas pipeline is mainly collected by monitoring equipment, and artificial intelligence image recognition algorithms are combined to analyze and judge the image content to detect whether there is a leakage phenomenon. However, such methods can usually only identify suspected leakage positions of the pipeline, lack analysis of the diffusion range of natural gas after leakage, resulting in poor accuracy and reliability of the detection results, and existing methods generally cannot achieve quantitative evaluation of the leakage area, especially in the identification of the leakage area, which has obvious limitations and cannot provide effective support for leakage level judgment, emergency disposal range demarcation, etc. Therefore, how to quickly identify the leakage area of the natural gas pipeline has become a problem to be solved. SUMMARY

[0004] The present application provides an image processing system and method for natural gas pipeline leakage detection, which can analyze the friction heat effect between high-pressure natural gas and the leakage port of the natural gas pipeline according to the heat friction diffusion vector, thereby generating a visual pipeline leakage area image.

[0005] In a first aspect, the present application provides an image processing method for natural gas pipeline leakage detection, which can be executed by a network device or a chip configured in the network device, and the present application does not limit this.

[0006] Specifically, the method comprises:

[0007] Collecting an infrared image of the natural gas pipeline, and extracting pipeline temperature features based on the infrared image of the natural gas pipeline;

[0008] When the pipeline temperature features are higher than a real-time leakage alarm threshold, collecting a natural gas pipeline image, and extracting pipeline boundary features according to the natural gas pipeline image;

[0009] extracting a pipeline boundary feature from the natural gas pipeline infrared image to obtain a natural gas leakage diffusion layer of the natural gas pipeline infrared image;

[0010] extracting a thermal friction diffusion vector from the natural gas leakage diffusion layer to obtain a set of thermal friction diffusion vectors, and generating a pipeline leakage point image through the set of thermal friction diffusion vectors;

[0011] extracting a diffusion feature quantity corresponding to each pipeline leakage point in the pipeline leakage point image, obtaining a natural gas pipeline flow pressure, and generating a pipeline leakage area image through the natural gas pipeline flow pressure and the diffusion feature quantity corresponding to each pipeline leakage point;

[0012] uploading the pipeline leakage point image and the pipeline leakage area image to a transmission control center of the natural gas pipeline.

[0013] With reference to the first aspect, in some implementations of the first aspect, before extracting the pipeline temperature feature based on the natural gas pipeline infrared image, the method further includes: performing image preprocessing on the natural gas pipeline infrared image.

[0014] With reference to the first aspect, in some implementations of the first aspect, the extracting a natural gas leakage diffusion layer of the natural gas pipeline infrared image according to the pipeline boundary feature specifically includes:

[0015] obtaining the pipeline boundary feature, performing scale alignment of the pipeline boundary feature and the natural gas pipeline infrared image based on an image registration algorithm to obtain a pipeline boundary mask region corresponding to the natural gas pipeline infrared image;

[0016] performing threshold segmentation on the infrared pixel points in the pipeline boundary mask region to obtain the natural gas leakage diffusion layer of the natural gas pipeline infrared image.

[0017] With reference to the first aspect, in some implementations of the first aspect, the performing threshold segmentation on the infrared pixel points in the pipeline boundary mask region to obtain the natural gas leakage diffusion layer of the natural gas pipeline infrared image specifically includes:

[0018] obtaining the infrared pixel points in the pipeline boundary mask region;

[0019] performing threshold screening on the infrared pixel points in the pipeline boundary mask region using a local adaptive threshold, and grouping the remaining infrared pixel points according to pixel coordinates to obtain the natural gas leakage diffusion layer of the natural gas pipeline infrared image.

[0020] With reference to the first aspect, in some implementations of the first aspect, generating the pipeline leakage point position image based on the set of heat-friction diffusion vectors specifically includes:

[0021] obtaining a natural gas leakage diffusion layer, and extracting a leakage direction vector corresponding to each infrared pixel point in the natural gas leakage diffusion layer based on the pipeline boundary feature;

[0022] obtaining the heat-friction diffusion vector, for any heat-friction diffusion vector, obtaining a leakage direction vector of an infrared pixel point corresponding to the heat-friction diffusion vector, and performing heat-friction diffusion pole judgment on the infrared pixel point corresponding to the heat-friction diffusion vector based on the leakage direction vector;

[0023] taking all infrared pixel points satisfying the heat-friction diffusion pole judgment condition as heat-friction diffusion poles, and performing connected region inspection to obtain a maximum pole connected region, and performing spatial projection transformation according to a position of the maximum pole connected region to generate the pipeline leakage point position image.

[0024] With reference to the first aspect, in some implementations of the first aspect, the natural gas pipeline infrared image is collected by an infrared thermal imaging camera.

[0025] With reference to the first aspect, in some implementations of the first aspect, the pipeline temperature feature is extracted based on the natural gas pipeline infrared image specifically includes: extracting a temperature maximum value, a temperature rise area, and a temperature rise gradient of the natural gas pipeline infrared image to form a temperature feature vector, and taking the temperature feature vector as the pipeline temperature feature.

[0026] The second aspect provides an image processing system for natural gas pipeline leakage detection, which includes a leakage image processing unit, and the leakage image processing unit includes:

[0027] an image collection module, configured to collect a natural gas pipeline infrared image, and extract a pipeline temperature feature based on the natural gas pipeline infrared image;

[0028] a threshold judgment module, configured to, when the pipeline temperature feature is higher than a real-time leakage alarm threshold, collect a natural gas pipeline image, and extract a pipeline boundary feature based on the natural gas pipeline image;

[0029] an image processing module, configured to perform layer feature extraction on the natural gas pipeline infrared image based on the pipeline boundary feature to obtain a natural gas leakage diffusion layer of the natural gas pipeline infrared image;

[0030] the image processing module is further configured to perform heat-friction diffusion vector extraction based on the natural gas leakage diffusion layer to obtain a set of heat-friction diffusion vectors, and generate a pipeline leakage point position image based on the set of heat-friction diffusion vectors;

[0031] The image processing module is further configured to extract diffusion feature quantities corresponding to each pipeline leakage point in the pipeline leakage point image, acquire a natural gas pipeline flow pressure, and generate a pipeline leakage area image through the natural gas pipeline flow pressure and the diffusion feature quantities corresponding to each pipeline leakage point.

[0032] An image uploading module is configured to upload the pipeline leakage point image and the pipeline leakage area image to a transmission control center of the natural gas pipeline.

[0033] In a third aspect, the present application provides a computer terminal device, which comprises a memory and a processor. The memory stores a code, and the processor is configured to acquire the code and execute the image processing method for natural gas pipeline leakage detection.

[0034] In a fourth aspect, the present application provides a computer readable storage medium, which stores at least one computer program. The computer program is loaded and executed by a processor to realize the operations performed by the image processing method for natural gas pipeline leakage detection.

[0035] The technical scheme provided by the embodiments of the present application has the following beneficial effects:

[0036] In the image processing system and method for natural gas pipeline leakage detection provided by the present application, first, a natural gas pipeline infrared image is collected, and pipeline temperature features are extracted based on the natural gas pipeline infrared image. When the pipeline temperature features are higher than a real-time leakage alarm threshold, a natural gas pipeline image is collected, and pipeline boundary features are extracted according to the natural gas pipeline image. The natural gas pipeline infrared image is subjected to layer feature extraction according to the pipeline boundary features, and a natural gas leakage diffusion layer of the natural gas pipeline infrared image is obtained. Heat friction diffusion vectors are extracted according to the natural gas leakage diffusion layer, and a heat friction diffusion vector set is obtained. The heat friction diffusion vector set is used to generate a pipeline leakage point image. Diffusion feature quantities corresponding to each pipeline leakage point in the pipeline leakage point image are extracted, a natural gas pipeline flow pressure is acquired, and a pipeline leakage area image is generated through the natural gas pipeline flow pressure and the diffusion feature quantities corresponding to each pipeline leakage point. The pipeline leakage point image and the pipeline leakage area image are uploaded to a transmission control center of the natural gas pipeline.

[0037] It can be seen that the high-pressure natural gas is sprayed at high speed through the pipe rupture opening in the leakage process, which is accompanied by severe friction between the pipe wall rupture edge, resulting in local high temperature, and as the natural gas flows out, heat exchange with the surrounding environment, resulting in gradual temperature attenuation, forming a heat diffusion pattern with directionality and gradient characteristics. The natural gas leakage diffusion layer in the natural gas pipeline infrared image is extracted through the pipeline boundary feature, and the infrared pixel points in the natural gas leakage diffusion layer are extracted respectively. The heat friction diffusion vector is used to reflect the direction and speed of the friction heat diffusion between the pipe wall rupture edge and the high-pressure oil and gas, and the heat friction diffusion pole in the infrared image is screened out in combination with the leakage direction vector, so as to generate the pipeline leakage point image, and then the diffusion characteristic quantity corresponding to the heat friction diffusion pole is extracted. The diffusion characteristic quantity reflects the intensity and range of heat diffusion. The greater the natural gas flow and pressure, the more intense the friction and heat release per unit area of the leakage opening, which shows more obvious diffusion characteristics. According to the diffusion characteristic quantity corresponding to the heat friction diffusion pole, the pipeline leakage area image is output, and the visualization expression of the leakage range is realized.

[0038] In summary, the heat friction diffusion vector can be used to analyze the friction heat effect between the high-pressure natural gas and the natural gas pipeline leakage opening, so as to generate a visual pipeline leakage area image. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 is an example flow chart of an image processing method for natural gas pipeline leakage detection according to some embodiments of the present application;

[0040] Figure 2 is a structural schematic diagram of a leakage image processing unit according to some embodiments of the present application;

[0041] Figure 3 is a structural schematic diagram of a computer terminal device for implementing an image processing method for natural gas pipeline leakage detection according to some embodiments of the present application. DETAILED DESCRIPTION

[0042] The application extracts pipeline temperature characteristics based on the natural gas pipeline infrared image; when the pipeline temperature characteristics are higher than the real-time leakage alarm threshold, a natural gas pipeline image is collected, and pipeline boundary characteristics are extracted according to the natural gas pipeline image; the natural gas pipeline infrared image is subjected to layer feature extraction according to the pipeline boundary characteristics, to obtain a natural gas leakage diffusion layer of the natural gas pipeline infrared image; a heat friction diffusion vector set is obtained through heat friction diffusion vector extraction according to the natural gas leakage diffusion layer, and a pipeline leakage point image is generated through the heat friction diffusion vector set; the diffusion characteristic quantity corresponding to each pipeline leakage point in the pipeline leakage point image is extracted, the natural gas pipeline flow pressure is obtained, and a pipeline leakage area image is generated through the natural gas pipeline flow pressure and the diffusion characteristic quantity corresponding to each pipeline leakage point; the friction heat effect between the high-pressure natural gas and the natural gas pipeline leakage port can be analyzed according to the heat friction diffusion vector, so as to generate a visual pipeline leakage area image.

[0043] In order to better understand the above technical solutions, the above technical solutions will be described in detail below in combination with the drawings of the specification and specific embodiments. Reference Figure 1 The figure is an exemplary flow chart of an image processing method for natural gas pipeline leakage detection according to some embodiments of the application, which mainly includes the following steps:

[0044] In step S101, a natural gas pipeline infrared image is collected, and pipeline temperature characteristics are extracted based on the natural gas pipeline infrared image.

[0045] Optionally, in some embodiments, the natural gas pipeline infrared image is collected by an infrared thermal imaging camera, for example, a non-cooled infrared camera module in a long-wave infrared band, but is not limited thereto. In other embodiments, other devices or equipment with infrared image collection capability can also be used, such as an infrared scanner, an integrated multi-spectral imaging module, a portable thermal imaging detector, etc., as long as they can realize image capture of the natural gas pipeline surface thermal radiation signal and meet the temperature resolution requirement, and can be used as the infrared image collection device of the application. The application does not limit this.

[0046] It should be noted that before extracting the pipeline temperature characteristics based on the natural gas pipeline infrared image, the natural gas pipeline infrared image is subjected to image preprocessing, and in specific implementation, the process of image preprocessing of the natural gas pipeline infrared image can include but is not limited to the following operations:

[0047] Gray normalization mapping: the pixel values corresponding to different thermal intensities in the natural gas pipeline infrared image are normalized to a fixed gray scale range (such as 0~255), which is used to enhance the thermal difference contrast in the natural gas pipeline infrared image;

[0048] Image noise filtering processing: an image smoothing algorithm using one of median filtering, Gaussian filtering or adaptive bilateral filtering, to eliminate random hot spot interference in the natural gas pipeline infrared image caused by low signal-to-noise ratio of the infrared image, and to suppress the interference of background noise on subsequent temperature analysis.

[0049] Preferably, in some embodiments, the pipeline temperature feature based on the natural gas pipeline infrared image specifically comprises: extracting a temperature maximum value, a temperature rise area, and a temperature rise gradient of the natural gas pipeline infrared image to form a temperature feature vector, and taking the temperature feature vector as the pipeline temperature feature, wherein the temperature maximum value of the natural gas pipeline infrared image is the maximum temperature value in the natural gas pipeline infrared image, which is used to determine whether there is a local high-temperature leakage source in the natural gas pipeline; the temperature rise area is the number of pixels of a continuous area higher than a normal temperature reference value in the image, which is converted into an actual area in combination with the image resolution; and the temperature rise gradient is a gradient value of the temperature of the calibrated pipeline edge pixel points diffusing from the hot spot to the surrounding, which is used to reflect the leakage diffusion trend.

[0050] In step S102, when the pipeline temperature feature is higher than the real-time leakage alarm threshold, a natural gas pipeline image is collected, and a pipeline boundary feature is extracted according to the natural gas pipeline image.

[0051] It should be noted that the determination condition of “the pipeline temperature feature being higher than the real-time leakage alarm threshold” in the present application is that any one of the pipeline temperature features in the temperature feature vector extracted from the natural gas pipeline infrared image exceeds the corresponding preset real-time leakage alarm threshold, i.e., a leakage suspected event is triggered. The preset threshold can be configured according to the pipeline operation parameters, historical working condition data, and pipeline material type, and can also be dynamically updated by machine learning to improve the discrimination accuracy.

[0052] Optionally, in some embodiments, the natural gas pipeline image can be collected by a visible light imaging device coaxial with the infrared thermal imager. The visible light image collection device can be preferably an industrial camera, a miniature vision module, or a multispectral imaging device in specific implementation. Preferably, the collection device supports image resolution, exposure time, and infrared thermal imager parameter linkage setting at the same time.

[0053] Preferably, in some embodiments of the present application, when the pipeline temperature feature is higher than the preset real-time leakage alarm threshold, the system starts to synchronously collect the visible light image of the natural gas pipeline, extracts the pipeline boundary feature in the natural gas pipeline image by combining the edge detection algorithm or the deep learning target detection model; the pipeline boundary feature includes but is not limited to: boundary contour point set, boundary region coordinate frame, central axis direction, geometric shape parameter, etc., which is used for subsequent layer mapping and ROI restriction of the leakage layer in the natural gas pipeline infrared image, and improves the spatial accuracy of leakage area extraction and the image alignment accuracy.

[0054] In some other embodiments of the present application, when any index in the pipeline temperature feature vector exceeds the preset alarm threshold, the system starts the visible light image collection module time-synchronized with the natural gas pipeline infrared image to obtain the real-time visible light image of the target region (i.e. the natural gas pipeline image). Combined with the image, the system identifies the natural gas pipeline region and extracts the boundary feature by using the edge detection algorithm (preferably Canny edge extraction) or the trained deep learning model (preferably YOLO recognition model, Mask R-CNN network).

[0055] Specifically, the pipeline boundary feature includes but is not limited to:

[0056] Boundary contour point set: complete boundary curve point set obtained by contour extraction algorithm;

[0057] Boundary region coordinate frame: minimum circumscribed rectangular frame coordinate of the target region;

[0058] Central axis direction: main direction vector of the pipeline obtained by fitting the contour geometric axis;

[0059] Geometric shape parameter: spatial structure information such as pipeline outer diameter, aspect ratio, edge curvature, etc.

[0060] Further, in order to realize accurate identification of the leakage heat layer in the subsequent infrared image, the above-mentioned extracted pipeline boundary feature can be used as a layer constraint region, and the natural gas pipeline infrared image is subjected to spatial alignment fusion processing. Specifically, it includes:

[0061] Based on the time synchronization and pixel registration information of the infrared image and the visible light image;

[0062] The boundary mask is mapped into the infrared image coordinate system by perspective transformation or affine transformation.

[0063] In step S103, the natural gas pipeline infrared image is subjected to layer feature extraction according to the pipeline boundary feature, and a natural gas leakage diffusion layer of the natural gas pipeline infrared image is obtained.

[0064] Preferably, in some embodiments, the layer feature extraction is performed on the natural gas pipeline infrared image according to the pipeline boundary feature, and the natural gas pipeline infrared image natural gas leakage diffusion layer is obtained, which specifically includes:

[0065] The pipeline boundary feature is obtained, and the pipeline boundary feature is scale-aligned with the natural gas pipeline infrared image based on an image registration algorithm, to obtain a pipeline boundary mask region corresponding to the natural gas pipeline infrared image.

[0066] The infrared pixel points in the pipeline boundary mask region are threshold segmented to obtain the natural gas pipeline infrared image natural gas leakage diffusion layer.

[0067] In a specific implementation, the pipeline boundary feature includes spatial structure information such as a pipeline contour point set, a boundary coordinate frame, and a central axis direction extracted from a visible light image, and feature construction is performed according to a boundary feature template. Then, the image registration technology is used to accurately map the pipeline boundary feature in the visible light image to the infrared image coordinate system. Preferably, the registration algorithm can include: performing a homography matrix or affine matrix transformation based on artificial calibration or landmark points (such as calibration targets and thermocouple positioning points); or realizing automatic registration based on feature point matching (such as a SIFT feature point set) combined with a RANSAC algorithm; in some other embodiments of the present application, a preset mapping relationship can be used under the condition that infrared and visible light image acquisition are synchronized, and the present application does not limit this. After the registration is completed, the connected region of the edge feature points obtained by mapping is the pipeline boundary mask region, which is also the region of interest defined in the infrared image in the present application.

[0068] Preferably, in some embodiments, the threshold segmentation is performed on the infrared pixel points in the pipeline boundary mask region to obtain the natural gas pipeline infrared image natural gas leakage diffusion layer, which specifically includes:

[0069] The infrared pixel points in the pipeline boundary mask region are obtained.

[0070] The local adaptive threshold is used to perform threshold screening on the infrared pixel points in the pipeline boundary mask region, and the remaining infrared pixel points are grouped according to pixel coordinates to form the natural gas pipeline infrared image natural gas leakage diffusion layer.

[0071] In some embodiments, the local adaptive threshold can be determined by using a local mean method, and the present application does not make too much repetition.

[0072] It should be noted that the natural gas leakage and diffusion layer in the present application is a pixel layer composed of the pixel position and shape information of the characteristic temperature region of the natural gas in the natural gas pipeline in the infrared image, which has a limited spatial position limited to the pipeline structure boundary and excludes background interference; the thermal characteristics are clear, and the characteristics of the significant region of the natural gas transmission temperature are highlighted.

[0073] Optionally, in some embodiments, in order to further improve the segmentation accuracy of the natural gas leakage and diffusion layer in the present application, morphological processing such as erosion, dilation, opening and closing operation can also be performed on the initially extracted natural gas leakage and diffusion layer region during implementation, so as to eliminate pixel noise of the natural gas leakage and diffusion layer, connect broken regions, and smooth the boundary.

[0074] In step S104, a thermal friction diffusion vector set is extracted according to the natural gas leakage and diffusion layer, and a pipeline leakage point image is generated by the thermal friction diffusion vector set.

[0075] Preferably, in some embodiments, the thermal friction diffusion vector extraction according to the natural gas leakage and diffusion layer specifically includes: obtaining the natural gas leakage and diffusion layer, and for any infrared pixel point in the natural gas leakage and diffusion layer, extracting eight-direction pixel gradients of the infrared pixel point to form a thermal friction diffusion vector of the infrared pixel point.

[0076] During implementation, for any infrared pixel point in the layer, an eight-neighborhood pixel structure is constructed with the point as the center, and the heat gradient in each direction is calculated based on the infrared gray value in the neighborhood, for example, the pixel gradient between the point and the neighborhood pixels in eight directions (up, down, left, right, upper left, upper right, lower left, and lower right) is calculated, and the pixel gradient values in the above eight directions are combined into the thermal friction diffusion vector of the current pixel, which is used to describe the heat energy diffusion direction and intensity of the pipeline edge position during the high-pressure natural gas leakage.

[0077] Preferably, in some embodiments, the pipeline leakage point image generated by the thermal friction diffusion vector set specifically includes:

[0078] The natural gas leakage and diffusion layer is obtained, and a leakage direction vector corresponding to each infrared pixel point in the natural gas leakage and diffusion layer is extracted based on the pipeline boundary feature;

[0079] The thermal friction diffusion vector is obtained, for any thermal friction diffusion vector, the leakage direction vector of the infrared pixel point corresponding to the thermal friction diffusion vector is obtained, and the thermal friction diffusion pole judgment is performed on the infrared pixel point corresponding to the thermal friction diffusion vector based on the leakage direction vector;

[0080] The infrared pixel points satisfying the thermal friction diffusion pole judgment condition are taken as thermal friction diffusion poles, and a connected region test is performed to obtain a maximum pole connected region. A spatial projection transformation is performed according to the position of the maximum pole connected region to generate a pipeline leakage point position image.

[0081] In a specific implementation, in the natural gas leakage and diffusion layer, the leakage direction vector corresponding to each infrared pixel point is determined in combination with the geometric structure features (such as the central axis direction and the boundary enclosing frame orientation) of the pipeline boundary in the infrared image, that is, it is assumed that the natural gas diffuses in a direction away from the normal of the pipeline boundary after leakage.

[0082] It should be noted that the leakage direction vector in the present application can be represented as a unit vector of each pixel point pointing to a possible leakage path. If the pipeline is in a straight line form, the leakage direction vector can be approximately a vector perpendicular to the boundary. If the pipeline is in a curved or special-shaped structure, the direction vector field can be dynamically generated through curvature calculation or boundary gradient calculation.

[0083] In a specific implementation, for each vector in the set of thermal friction diffusion vectors, the leakage direction vector of the corresponding infrared pixel point is found, and a thermal friction diffusion pole judgment is performed. It should be noted that the principle of the thermal friction diffusion pole judgment is as follows: the high-pressure transmitted natural gas will cause local temperature rise due to friction with the rupture edge at the leakage port, and the temperature gradually decreases after heat exchange with air or the surrounding environment as it diffuses outward. Therefore, there will be a trend of gradually decreasing temperature along the leakage direction on the leakage path, and the thermal friction diffusion pole in the present application is a local maximum temperature point in the leakage direction. The judgment condition is as follows: if the direction of the thermal friction diffusion vector of a certain infrared pixel point is basically consistent with the leakage direction vector (the included angle is within a threshold range), and the temperature value of the pixel point in the leakage direction is a local maximum value (relative to a plurality of pixel points before and after in the direction), the pixel point is judged as a thermal friction diffusion pole. Then, all pixel points satisfying the thermal friction diffusion pole condition are marked as thermal friction diffusion poles, and a connected region analysis is performed. The largest pole connected region is detected as the maximum pole connected region by using a connected domain marking algorithm. The maximum pole connected region is projected and mapped to the corresponding space coordinates in the infrared image coordinate system to obtain the pipeline leakage point position image.

[0084] In step S105, the diffusion feature quantity corresponding to each pipeline leakage point in the pipeline leakage point position image is extracted, the natural gas pipeline flow pressure is obtained, and the pipeline leakage area image is generated through the natural gas pipeline flow pressure and the diffusion feature quantity corresponding to each pipeline leakage point.

[0085] Preferably, in some embodiments, the extraction of the diffusion feature quantity corresponding to each pipeline leakage point in the pipeline leakage point position image specifically includes:

[0086] obtaining each pipeline leakage point in the pipeline leakage point image;

[0087] For any one pipeline leakage point, backtracking its composition information in the natural gas leakage diffusion layer, obtaining the thermal friction diffusion pole and the leakage direction vector corresponding to the pipeline leakage point, extracting the average pixel gradient of the thermal friction diffusion pole in the direction corresponding to the each leakage direction vector as the diffusion feature quantity corresponding to the pipeline leakage point;

[0088] The diffusion feature quantity corresponding to each pipeline leakage point in the pipeline leakage point image is extracted in the same way.

[0089] In a specific implementation, in the process of obtaining each pipeline leakage point in the pipeline leakage point image, first, the pipeline leakage point image generated in the previous step is analyzed, and all the leakage point regions marked or detected therein are identified; each leakage point can be represented by the center coordinates of its corresponding maximum diffusion pole connected region, or can be positioned according to the centroid of the connected region; each leakage point is individually numbered and marked for subsequent feature quantity extraction and matching; then for any pipeline leakage point, backtracking its composition information in the diffusion layer, obtaining the set of thermal friction diffusion poles contained therein; and for each pole pixel, extracting its leakage direction vector, i.e. the possible diffusion direction of its position under the reference of the pipeline structure, for each of the multiple diffusion poles contained in each leakage point, constructing a one-dimensional pixel gradient path along the respective leakage direction vector, and extracting the temperature variation trend in this direction; specifically, a first-order gradient calculation method can be used to take the gradient absolute values of a plurality of consecutive pixels in this direction and perform average operation, as the diffusion feature quantity of the leakage point.

[0090] Optionally, in some embodiments, to improve robustness, the gradient values extracted in the diffusion direction can be smoothed or outliers can be removed; at the same time, time series analysis can also be introduced to dynamically track the diffusion feature quantity of the same leakage point in consecutive frames, extract its growth trend, and judge the leakage deterioration degree; finally, the diffusion feature quantity can be further associated with the pipe parameters such as the material and wall thickness of the pipe section where the leakage point is located to improve the accuracy of the leakage area estimation, which is not limited by the present application.

[0091] Preferably, in some embodiments, generating a pipeline leakage area image by the natural gas pipeline flow pressure and the diffusion feature quantity corresponding to each pipeline leakage point specifically includes:

[0092] obtaining the natural gas pipeline flow pressure, obtaining the diffusion feature quantity corresponding to each pipeline leakage point to form a diffusion learning vector;

[0093] perform feature learning based on the natural gas pipeline flow pressure and the diffusion learning vector, generate a pipeline leakage area, and generate a pipeline leakage area image based on the pipeline leakage area.

[0094] In a specific implementation, the present application can retrieve the natural gas flow and pressure data at the current time or at the time of leakage from the pipeline transmission control system or the field monitoring node, including but not limited to instantaneous pressure value, average flow rate, pressure fluctuation amplitude, etc., and can establish a flow pressure historical data model for a specific pipe section through a moving average autoregressive model to eliminate the influence of short-term measurement error on the leakage area estimation; then extract the corresponding diffusion characteristic quantity for each pipeline leakage point, and sequentially form a multi-dimensional vector according to the leakage point number, based on the diffusion learning vector and the corresponding pipeline flow pressure value, and use a machine learning algorithm or a mathematical model for joint feature modeling.

[0095] It should be noted that in the case of large pipeline flow pressure, the leakage port is usually small, so the thermal friction effect per unit area of leakage is stronger, and the temperature change is more drastic, resulting in larger diffusion characteristic quantity; on the contrary, if the diffusion characteristic quantity is small but the flow pressure is also small, it corresponds to a larger leakage area but insufficient energy density. In some specific embodiments of the present application, the natural gas pipeline flow pressure and the diffusion learning vector can be used to perform feature learning through a single hidden layer neural network to generate a pipeline leakage area.

[0096] The following gives a specific embodiment of the present application for generating a pipeline leakage area by performing feature learning on the natural gas pipeline flow pressure and the diffusion learning vector through a single hidden layer neural network:

[0097] First, the current flow value and pressure value of the natural gas pipeline and the extracted diffusion characteristic quantity corresponding to each pipeline leakage point are combined into an input data vector and input into a single hidden layer neural network. The hidden layer of the single hidden layer neural network includes a plurality of activation function nodes for feature aggregation and non-linear mapping learning of the input data vector; the output layer of the network outputs the corresponding leakage area prediction result to form the final pipeline leakage area estimation value.

[0098] In the training phase, a plurality of data samples with flow, pressure, diffusion characteristic quantity and leakage area true measurement value pre-collected or simulated are used as a training set, and each group of samples is input into the single hidden layer neural network for classification and regression training. The activation function of the hidden layer can be selected as the ReLU function, which is determined according to the actual data distribution and convergence condition.

[0099] During the training process, the loss function such as mean square error is calculated by the error between the predicted area of the output layer and the real value of the leakage area corresponding to the sample, and the back propagation algorithm is used to optimize and update the neural network parameters. When the error between the output area estimation value and the real area is lower than the preset error threshold, or the loss function converges to the minimum value, the training process ends.

[0100] In actual inference use, the system can input the trained neural network according to the flow pressure data and the diffusion characteristic quantity of the leakage point obtained at any time, output the area estimation result of each leakage point, and combine the spatial position and the image drawing strategy to form a pipeline leakage area image, thereby realizing the visualization of the leakage range.

[0101] In the above manner, the neural network model can establish a nonlinear mapping relationship between the input features and the leakage area, realize intelligent evaluation and rapid inference of the leakage area without explicitly establishing a physical model, and effectively improve the response capability of the system to complex leakage behaviors and the accuracy of image expression.

[0102] In step S106, the pipeline leakage point position image and the pipeline leakage area image are uploaded to the transmission control center of the natural gas pipeline.

[0103] It should be noted that the transmission control center is a core system platform for centralized management, monitoring and scheduling of oil and gas flow in a natural gas or long-distance natural gas pipeline system, and is generally located in the command and dispatch building or remote cloud service center of the pipeline operator. In the process of uploading the pipeline leakage point position image and the pipeline leakage area image to the transmission control center of the natural gas pipeline, the pipeline leakage point position image and the pipeline leakage area image can be uniformly processed in PNG format, and metadata such as image generation time, pipeline segment number, coordinate position, image type label, etc. can be provided for each image. The pipeline leakage point position image and the pipeline leakage area image can be uploaded through a wired or wireless communication module (such as 4G / 5G, satellite link, Wi-Fi, LoRa).

[0104] In addition, another aspect of the present application, in some embodiments, the present application provides an image processing system for natural gas pipeline leakage detection, which comprises a leakage image processing unit, which is Figure 2 The figure is a structural schematic diagram of an exemplary hardware and / or software of a leakage image processing unit according to some embodiments of the present application. The leakage image processing unit 200 comprises an image acquisition module 201, a threshold judgment module 202, an image processing module 203 and an image uploading module 204, which are described as follows:

[0105] The image acquisition module 201 is configured to acquire a natural gas pipeline infrared image, and extract a pipeline temperature feature based on the natural gas pipeline infrared image.

[0106] The threshold judgment module 202 is configured to acquire a natural gas pipeline image when the pipeline temperature feature is higher than a real-time leakage alarm threshold, and extract a pipeline boundary feature based on the natural gas pipeline image.

[0107] The image processing module 203 is configured to perform layer feature extraction on the natural gas pipeline infrared image based on the pipeline boundary feature, and obtain a natural gas leakage diffusion layer of the natural gas pipeline infrared image.

[0108] The image processing module 203 is further configured to perform heat friction diffusion vector extraction based on the natural gas leakage diffusion layer, obtain a heat friction diffusion vector set, and generate a pipeline leakage point image through the heat friction diffusion vector set.

[0109] The image processing module 203 is further configured to extract diffusion feature quantities corresponding to each pipeline leakage point in the pipeline leakage point image, obtain a natural gas pipeline flow pressure, and generate a pipeline leakage area image through the natural gas pipeline flow pressure and the diffusion feature quantities corresponding to each pipeline leakage point.

[0110] The image uploading module 204 is configured to upload the pipeline leakage point image and the pipeline leakage area image to a transmission control center of the natural gas pipeline.

[0111] The above describes an example of an image processing system and method for natural gas pipeline leakage detection provided by the embodiments of the present application in detail. It can be understood that the corresponding device contains the corresponding hardware structure and / or software module for executing each function in order to realize the above functions.

[0112] Those skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function in the application is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution, so a person skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0113] In addition, the present application also provides a computer terminal device, which comprises a memory and a processor, the memory stores a code, and the processor is configured to acquire the code and execute the above-mentioned image processing method for natural gas pipeline leakage detection.

[0114] In some embodiments, referenceFigure 3 Fig. 3 is a schematic diagram of a computer terminal device for implementing the image processing method for natural gas pipeline leakage detection according to some embodiments of the present application. The image processing method for natural gas pipeline leakage detection according to some embodiments of the present application can be implemented by the computer terminal device shown in Fig. 3. The computer terminal device 300 includes at least one communication bus 301, a communication interface 302, a processor 303, and a memory 304. Figure 3 The computer terminal device 300 includes at least one communication bus 301, a communication interface 302, a processor 303, and a memory 304.

[0115] The processor 303 can be a general central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more processors for controlling the execution of the image processing method for natural gas pipeline leakage detection according to some embodiments of the present application.

[0116] The communication bus 301 can include a path for transmitting information between the above-mentioned components.

[0117] The memory 304 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 304 can exist independently and be connected to the processor 303 through the communication bus 301. The memory 304 can also be integrated with the processor 303.

[0118] The memory 304 is used to store program code for executing the scheme of the present application and is controlled by the processor 303 for execution. The processor 303 is used to execute the program code stored in the memory 304. The program code can include one or more software modules. The determination of the heat-friction diffusion vector according to some embodiments of the present application can be implemented by the processor 303 and one or more software modules in the program code in the memory 304.

[0119] The communication interface 302, using any transceiver-like mechanism, is used to communicate with other devices or communication networks, such as an Ethernet network, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0120] Optionally, the computer terminal device 300 can further include a power supply 305 for providing power to various devices or circuits in the real-time computer terminal device.

[0121] In a specific implementation, as an example, the computer terminal device can include a plurality of processors, each of which can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0122] The computer terminal device described above can be a general-purpose computer terminal device or a special-purpose computer terminal device. In a specific implementation, the computer terminal device can be a desktop computer, a laptop computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiments of the present application do not limit the type of computer terminal device.

[0123] In addition, other aspects of the present application also provide a computer-readable storage medium, which stores at least one computer program, and the computer program is loaded and executed by a processor to implement the operations performed by the above-mentioned image processing method for natural gas pipeline leakage detection.

[0124] In summary, the image processing system and method for natural gas pipeline leakage detection disclosed in the embodiments of the present application first collects a natural gas pipeline infrared image, extracts pipeline temperature features based on the natural gas pipeline infrared image, collects a natural gas pipeline image when the pipeline temperature features are higher than a real-time leakage alarm threshold, extracts pipeline boundary features according to the natural gas pipeline image, extracts layer features from the natural gas pipeline infrared image according to the pipeline boundary features, obtains a natural gas leakage diffusion layer of the natural gas pipeline infrared image, extracts a thermal friction diffusion vector set according to the natural gas leakage diffusion layer, generates a pipeline leakage point image through the thermal friction diffusion vector set, extracts diffusion feature quantities corresponding to each pipeline leakage point in the pipeline leakage point image, obtains a natural gas pipeline flow pressure, and generates a pipeline leakage area image through the natural gas pipeline flow pressure and the diffusion feature quantities corresponding to each pipeline leakage point. The friction heat effect between high-pressure natural gas and a natural gas pipeline leakage port can be analyzed according to the thermal friction diffusion vector, so as to generate a visual pipeline leakage area image.

[0125] The above is only an embodiment of the present application, and common technical solutions or characteristics in the scheme are not described in detail. It should be noted that, for those skilled in the art, without departing from the technical solutions of the present application, a number of modifications and improvements can be made, which should also be considered as the protection scope of the present application, and these will not affect the effect and practicality of the present application.

[0126] The scope of protection of the present application should be subject to the content of its claims, and the specific embodiments in the specification can be used to explain the content of the claims. Obviously, those skilled in the art can make various modifications and changes to the present application without departing from the spirit and scope of the present application. Therefore, if these modifications and changes of the present application belong to the scope of the claims of the present application and its equivalent technology, the present application also intends to include these modifications and changes.

Claims

1. A method for image processing in natural gas pipeline leak detection, characterized in that, The method comprises the following steps: acquiring an infrared image of a natural gas pipeline, and extracting a pipeline temperature feature based on the infrared image of the natural gas pipeline; when the pipeline temperature feature is higher than a real-time leakage alarm threshold, acquiring an image of the natural gas pipeline, and extracting a pipeline boundary feature based on the image of the natural gas pipeline; extracting a natural gas leakage diffusion layer of the infrared image of the natural gas pipeline based on the pipeline boundary feature; extracting a heat friction diffusion vector set based on the natural gas leakage diffusion layer, and generating a pipeline leakage point image based on the heat friction diffusion vector set; extracting a diffusion feature quantity corresponding to each pipeline leakage point in the pipeline leakage point image, acquiring a natural gas pipeline flow pressure, and generating a pipeline leakage area image based on the natural gas pipeline flow pressure and the diffusion feature quantity corresponding to each pipeline leakage point; uploading the pipeline leakage point image and the pipeline leakage area image to a transmission control center of the natural gas pipeline.

2. The method of claim 1, wherein, Before the step of extracting the pipeline temperature feature based on the infrared image of the natural gas pipeline, the method further comprises the step of performing image preprocessing on the infrared image of the natural gas pipeline.

3. The method of claim 1, wherein, The step of extracting a natural gas leakage diffusion layer of the infrared image of the natural gas pipeline based on the pipeline boundary feature specifically comprises the following steps: acquiring the pipeline boundary feature, performing scale alignment on the pipeline boundary feature and the infrared image of the natural gas pipeline based on an image registration algorithm, and obtaining a pipeline boundary mask region corresponding to the infrared image of the natural gas pipeline; performing threshold segmentation on infrared pixel points in the pipeline boundary mask region, and obtaining the natural gas leakage diffusion layer of the infrared image of the natural gas pipeline.

4. The method of claim 3, wherein, The step of performing threshold segmentation on infrared pixel points in the pipeline boundary mask region, and obtaining the natural gas leakage diffusion layer of the infrared image of the natural gas pipeline specifically comprises the following steps: acquiring the infrared pixel points in the pipeline boundary mask region; performing threshold screening on the infrared pixel points in the pipeline boundary mask region by using a local adaptive threshold, and grouping the remaining infrared pixel points according to pixel coordinates to obtain the natural gas leakage diffusion layer of the infrared image of the natural gas pipeline.

5. The method of claim 1, wherein, The step of generating a pipeline leakage point image based on the heat friction diffusion vector set specifically comprises the following steps: acquiring a natural gas leakage diffusion layer, extracting a leakage direction vector corresponding to each infrared pixel point in the natural gas leakage diffusion layer based on the pipeline boundary feature; acquiring the heat friction diffusion vector, for any heat friction diffusion vector, acquiring a leakage direction vector of an infrared pixel point corresponding to the heat friction diffusion vector, and performing heat friction diffusion pole judgment on the infrared pixel point corresponding to the heat friction diffusion vector based on the leakage direction vector; regarding all infrared pixel points satisfying the heat friction diffusion pole judgment condition as heat friction diffusion poles, and performing connected region inspection to obtain a maximum pole connected region, performing spatial projection transformation according to a position of the maximum pole connected region, and generating a pipeline leakage point image.

6. The method of claim 1, wherein, The infrared image of the natural gas pipeline is acquired by an infrared thermal imaging camera.

7. The method of claim 1, wherein, The pipeline temperature feature is extracted based on the natural gas pipeline infrared image, and specifically includes extracting a temperature maximum value, a temperature rise area, and a temperature rise gradient of the natural gas pipeline infrared image to form a temperature feature vector, and taking the temperature feature vector as the pipeline temperature feature.

8. An image processing system for natural gas pipeline leak detection, comprising a leak image processing unit for performing the image processing method for natural gas pipeline leak detection according to any one of claims 1 to 7, characterized in that, The leakage image processing unit includes: An image acquisition module is configured to acquire a natural gas pipeline infrared image, and extract a pipeline temperature feature based on the natural gas pipeline infrared image; A threshold judgment module is configured to acquire a natural gas pipeline image when the pipeline temperature feature is higher than a real-time leakage alarm threshold, and extract a pipeline boundary feature based on the natural gas pipeline image; An image processing module is configured to extract a natural gas leakage diffusion layer of the natural gas pipeline infrared image based on the pipeline boundary feature; The image processing module is further configured to extract a thermal friction diffusion vector set based on the natural gas leakage diffusion layer, and generate a pipeline leakage point image based on the thermal friction diffusion vector set; The image processing module is further configured to extract a diffusion feature quantity corresponding to each pipeline leakage point in the pipeline leakage point image, acquire a natural gas pipeline flow pressure, and generate a pipeline leakage area image based on the natural gas pipeline flow pressure and the diffusion feature quantity corresponding to each pipeline leakage point; An image uploading module is configured to upload the pipeline leakage point image and the pipeline leakage area image to a transmission control center of the natural gas pipeline.

9. A computer terminal device, characterized by The computer terminal device includes a memory and a processor, the memory stores a code, and the processor is configured to acquire the code and execute an image processing method for natural gas pipeline leakage detection according to any one of claims 1 to 7.

10. A computer-readable storage medium storing at least one computer program, characterized in that, The computer program is loaded and executed by the processor to implement the operations performed by the image processing method for natural gas pipeline leakage detection according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Natural gas pipeline leakage monitoring system based on thermal infrared imager

    CN115751203A

  • Method for leakage detection of underground pipeline corridor based on dynamic infrared thermal image processing

    US20190331301A1

  • Infrared imaging systems and methods for gas leak detection

    US20190340914A1

  • Method for locating a gas leak and the leakage point of same in an industrial scene, and corresponding gas-leak locating system

    WO2016174370A1

Cited By

  • Gas pipe network leakage detection method, device and system

    CN121408640A