Transport pipeline detection method, device and system based on thermal infrared image

By using a pipeline detection method based on thermal infrared images, a dynamic background model is constructed to automatically monitor pipeline leaks. This solves the problem of the inability to detect leaks in a timely manner in existing technologies, achieving efficient and intelligent pipeline monitoring, ensuring safety and reducing manpower consumption.

CN117432951BActive Publication Date: 2026-02-17CHINA ENERGY GRP NINGXIA COAL IND CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311402580.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2026-02-17
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

In existing technologies, pipeline leaks cannot be detected in a timely and accurate manner, leading to economic losses and safety hazards. Furthermore, manual inspections are time-consuming and labor-intensive, and the safety of inspection personnel cannot be guaranteed.

Method used

A pipeline detection method based on thermal infrared images is adopted. By acquiring multiple thermal infrared images, a background model is constructed and moving targets are analyzed to automatically monitor pipeline leaks. The background model is dynamically adjusted using preset parameters to cope with changes in the pipeline site.

Benefits of technology

It enables timely and accurate detection of pipeline leaks, reduces manpower consumption, and can monitor around the clock, especially at night and in severe weather conditions, thus improving safety and intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117432951B_ABST
    Figure CN117432951B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and system for detecting transport pipelines based on thermal infrared images. The method includes: acquiring multiple first thermal infrared images and second thermal infrared images, wherein the multiple first thermal infrared images are thermal infrared images of the detection location on the transport pipeline at different times within a preset time interval, and the second thermal infrared image is a thermal infrared image of the detection location at the current time after the preset time interval; determining a background model of the transport pipeline based at least on preset model parameters and the first pixel values ​​of the multiple first thermal infrared images, wherein the preset model parameters characterize the model growth rate of the background model; and determining a moving target in the second thermal infrared image based on the background model and the second thermal infrared image, wherein the moving target characterizes a leaking object in the transport pipeline. This application solves the problem in the prior art of not being able to detect leaks in transport pipelines in a timely and accurate manner and to determine the location of the leak.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of pipeline inspection technology, and more specifically, to a pipeline inspection method based on thermal infrared images, a pipeline inspection device based on thermal infrared images, a computer-readable storage medium, and a pipeline inspection system based on thermal infrared images. Background Technology

[0002] Leaks in pipeline transportation, especially those transporting coal gas and pulverized coal, can lead to both economic losses and significant safety hazards. Timely and accurate reporting of leak locations is crucial for the safe operation of pipeline transportation. Traditional industrial sites rely on periodic manual inspections to monitor pipeline operations. This method is time-consuming and labor-intensive, cannot promptly report leaks or their locations, and poses a significant safety risk to inspection personnel. Summary of the Invention

[0003] The main objective of this application is to provide a method, device, computer-readable storage medium, and system for detecting pipeline leaks based on thermal infrared images, so as to at least solve the problem in the prior art that the leakage of pipelines cannot be detected in a timely and accurate manner and the location of the leakage.

[0004] To achieve the above objectives, according to one aspect of this application, a method for detecting a transport pipeline based on thermal infrared images is provided, comprising: acquiring a plurality of first thermal infrared images and second thermal infrared images, wherein the plurality of first thermal infrared images are thermal infrared images of the detection location on the transport pipeline at different times within a preset time interval, and the second thermal infrared image is a thermal infrared image of the detection location at the current time after the preset time interval; determining a background model of the transport pipeline based at least on preset model parameters and first pixel values ​​of the plurality of first thermal infrared images, wherein the preset model parameters are used to characterize the model growth rate of the background model; and determining a moving target in the second thermal infrared image based on the background model and the second thermal infrared image, wherein the moving target is used to characterize a leaking object in the transport pipeline.

[0005] Optionally, the background model of the transport pipeline is determined at least based on model preset parameters and first pixel values ​​of multiple first thermal infrared images, including: determining whether the first pixel value is less than a first preset threshold and greater than a second preset threshold, where the first preset threshold is the maximum pixel value set in the initial model and the second preset threshold is the minimum pixel value set in the initial model; if the first pixel value is less than the first preset threshold and greater than the second preset threshold, determining a first parameter based on the first pixel value and the current maximum pixel value in the initial model, determining a second parameter based on the first pixel value and the current minimum pixel value in the initial model, determining a third parameter based on the sum of the first pixel value, model preset parameters, and the first threshold, and determining a third parameter based on the difference between the first pixel value, model preset parameters, and the first threshold. A fourth parameter is determined, and the initial model is trained based on the first, second, third, and fourth parameters to obtain a first background model. The current maximum pixel value is less than or equal to the maximum pixel value, and the current minimum pixel value is greater than or equal to the minimum pixel value. If the first pixel value is greater than or equal to a first preset threshold or less than or equal to a second preset threshold, the fifth and sixth parameters are both determined to be the first pixel value. The seventh parameter is determined based on the sum of the first pixel value and the model preset parameters, and the eighth parameter is determined based on the difference between the first pixel value and the model preset parameters. The initial model is trained using the fifth, sixth, seventh, and eighth parameters to obtain a second background model. The background model includes the first background model and the second background model.

[0006] Optionally, the background model has a first parameter and a second parameter. Determining the moving target in the second thermal infrared image based on the background model and the second thermal infrared image includes: sequentially determining whether each second pixel value in the second thermal infrared image is located within a preset interval to obtain a second determination result. The preset interval has a first end value and a second end value. The first end value is the sum of the first parameter and a second threshold, and the second end value is the difference between the second parameter and a third threshold. The second threshold is the maximum critical value for segmenting foreground objects and background objects in the second thermal infrared image, and the third threshold is the minimum critical value for segmenting foreground objects and background objects. If the second determination result indicates that the target's second pixel value is located within the preset interval, the target's second pixel value is determined to belong to the background object. If the second determination result indicates that the target's second pixel value is not located within the preset interval, the target's second pixel value is determined to belong to the foreground object. The foreground object is used to represent the moving target.

[0007] Optionally, before determining the background model of the transport pipeline based on the model preset parameters and the first pixel values ​​of multiple first thermal infrared images, the method further includes: enlarging the initial pixel value of the first thermal infrared image according to a preset ratio to obtain a first preliminary pixel value; determining whether the first preliminary pixel value is greater than a preset pixel threshold; if the first preliminary pixel value is greater than the preset pixel threshold, determining the second preliminary pixel value of the first thermal infrared image to be 0; if the first preliminary pixel value is less than or equal to the preset pixel threshold, determining the second preliminary pixel value to be 255, so as to obtain a binary image corresponding to the first thermal infrared image; performing dilation processing on the binary image to obtain a third preliminary pixel value of the mask template of the first thermal infrared image; and performing mask operation based on the initial pixel value and the third preliminary pixel value to obtain the first pixel value.

[0008] According to another aspect of this application, a pipeline detection device based on thermal infrared images is provided, comprising: an acquisition unit for acquiring a plurality of first thermal infrared images and second thermal infrared images, wherein the plurality of first thermal infrared images are thermal infrared images of the detection location on the pipeline at different times within a preset time interval, and the second thermal infrared image is a thermal infrared image of the detection location at the current time after the preset time interval; a modeling unit for determining a background model of the pipeline based at least on preset model parameters and first pixel values ​​of the plurality of first thermal infrared images, wherein the preset model parameters are used to characterize the model growth rate of the background model; and a monitoring unit for determining moving targets in the second thermal infrared images based on the background model and the second thermal infrared images, wherein the moving targets are used to characterize leaking objects in the pipeline.

[0009] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the above-described method for detecting transport pipelines based on thermal infrared images.

[0010] According to another aspect of this application, a pipeline inspection system based on thermal infrared images is provided, comprising: an infrared thermal imager for generating thermal infrared images of a detection location on the pipeline, wherein the thermal infrared images include multiple first thermal infrared images and second thermal infrared images, wherein the multiple first thermal infrared images are thermal infrared images of the detection location at different times within a preset time interval, and the second thermal infrared images are thermal infrared images of the detection location at the current time after the preset time interval; and a monitoring server, communicatively connected to the infrared thermal imager, for acquiring the multiple first thermal infrared images and second thermal infrared images, and determining a background model of the pipeline based at least on model preset parameters and first pixel values ​​of the multiple first thermal infrared images, and determining moving targets in the second thermal infrared images based on the background model and the second thermal infrared images, wherein the model preset parameters are used to characterize the model growth rate of the background model, and the moving targets are used to characterize leaking objects in the pipeline.

[0011] Optionally, the above-mentioned pipeline inspection system based on thermal infrared images further includes: a switch having a first input port and a first output port, the first input port being communicatively connected to multiple infrared thermal imagers, and the first output port being communicatively connected to a monitoring server.

[0012] Optionally, the above-mentioned pipeline inspection system based on thermal infrared images further includes: an optical transmitter having a second input port and a second output port, the second input port being communicatively connected to an infrared thermal imager; and an optical receiver having a third input port and a third output port, the third input port being communicatively connected to the second output port, and the third output port being communicatively connected to a switch.

[0013] Optionally, the above-mentioned pipeline inspection system based on thermal infrared images further includes: a storage device having a fourth input port and a fourth output port, the fourth input port being communicatively connected to a switch; and a monitoring device being signal-connected to the fourth output port.

[0014] Optionally, the above-mentioned pipeline detection system based on thermal infrared images further includes an alarm system, which is connected to the monitoring server and is used to perform alarm processing when a moving target is found in the second thermal infrared image.

[0015] By applying the technical solution of this application, multiple first thermal infrared images and second thermal infrared images can be acquired firstly. Then, based on the model preset parameters and the first pixel values ​​of the multiple first thermal infrared images, a background model of the transport pipeline can be determined. The model preset parameters are used to characterize the model growth rate of the background model. Therefore, the background model dynamically changes with changes in the pipeline site. This background model can then automatically monitor the transport pipeline based on the second thermal infrared images, thereby identifying moving targets in the second thermal infrared images. These moving targets can then be used to characterize leaking objects in the transport pipeline. In summary, the background model of this application has strong anti-interference capabilities and can effectively extract moving targets even in backgrounds with slight movement. This solves the problem of not being able to detect leaks in transport pipelines in a timely and accurate manner and to determine the location of the leak, effectively ensuring the safety of inspection personnel. Furthermore, the detection method of this application has a high degree of intelligence, enabling all-weather pipeline monitoring and handling nighttime and inclement weather conditions, significantly reducing manpower consumption. Attached Figure Description

[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 A hardware structure block diagram of a mobile terminal for performing a transport pipeline detection method based on thermal infrared images, according to an embodiment of this application, is shown.

[0018] Figure 2 A schematic flowchart of a transportation pipeline detection method based on thermal infrared images according to an embodiment of this application is shown.

[0019] Figure 3 A schematic diagram of the image preprocessing process for the first thermal infrared image and the second thermal infrared image is shown.

[0020] Figure 4 A flowchart illustrating the process of constructing the background model is shown;

[0021] Figure 5 A schematic diagram of the process for analyzing a second thermal infrared image using a background model is shown;

[0022] Figure 6 A structural block diagram of a transport pipeline detection device based on thermal infrared images provided according to an embodiment of this application is shown;

[0023] Figure 7 A structural block diagram of a transport pipeline detection system based on thermal infrared images provided according to an embodiment of this application is shown.

[0024] The above figures include the following reference numerals:

[0025] 100. Infrared thermal imager; 101. Monitoring server; 102. Switch; 103. Optical transmitter; 104. Optical receiver; 105. Storage device; 106. Monitoring equipment; 107. Alarm system. Detailed Implementation

[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] As described in the background section, pipeline inspection is a crucial guarantee for the safe operation of pipeline transportation. The inability to report pipeline leaks and their locations in a timely manner can lead to both economic losses and significant safety hazards. Therefore, existing technologies employ regular manual inspections to monitor pipeline operations, particularly for pipelines transporting coal gas and pulverized coal, to detect leaks. However, manual inspections are time-consuming and labor-intensive, cannot provide timely and accurate leak location reports, and pose risks to the safety of inspection personnel. To address the technical problem of the inability to promptly and accurately detect pipeline leaks and their locations in existing technologies, embodiments of this application provide a pipeline inspection method based on thermal infrared imaging.

[0030] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0031] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a transportation pipeline detection method based on thermal infrared images, according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. The processor (which may include, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA), etc.) and a memory for storing data are also shown. The mobile terminal may further include transmission devices for communication functions and input / output devices. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0032] The memory can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the transportation pipeline detection method based on thermal infrared images in this embodiment of the invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, thereby implementing the above-described method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one instance, the transmission device includes a Network Interface Controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one instance, the transmission device may be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0033] This embodiment provides a method for detecting transport pipelines based on thermal infrared images, which runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0034] Figure 2 This is a flowchart of a transportation pipeline detection method based on thermal infrared images according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:

[0035] Step S201: Acquire multiple first thermal infrared images and second thermal infrared images. The multiple first thermal infrared images are thermal infrared images of the detection position on the transport pipeline at different times within a preset time interval, and the second thermal infrared images are thermal infrared images of the detection position at the current time after the preset time interval.

[0036] Specifically, the multiple first thermal infrared images are thermal infrared images of any detection location of one or more transport pipelines at different times within a preset time interval. The multiple first thermal infrared images and the second thermal infrared image are both thermal infrared images of the same detection location, but the second thermal infrared image and the multiple first thermal infrared images are generated at different times, that is, the second thermal infrared image is generated later than the first thermal infrared image.

[0037] Optionally, the aforementioned plurality of first thermal infrared images and second thermal infrared images may be generated by a single infrared thermal imager located at the same detection position on the same or one or more transport pipelines; alternatively, the aforementioned plurality of first thermal infrared images and second thermal infrared images may also be generated by multiple infrared thermal imagers located at different detection positions on the same or one or more transport pipelines; alternatively, the aforementioned plurality of first thermal infrared images and second thermal infrared images may also be generated by multiple infrared thermal imagers located at multiple different detection positions on multiple different transport pipelines.

[0038] The aforementioned preset time interval can be a set of continuous historical time points, or it can be multiple discrete time points within a certain historical time interval, or it can be multiple different discrete time points within multiple different historical time intervals.

[0039] Step S202: Determine the background model of the transport pipeline based at least on the model preset parameters and the first pixel values ​​of multiple first thermal infrared images. The model preset parameters are used to characterize the model growth rate of the background model.

[0040] Specifically, the aforementioned model preset parameters are mainly determined by the environment of the pipeline site. Since the feature distribution varies significantly at different locations within the pipeline site, the feature distribution also varies significantly at different detection locations within the pipeline. Therefore, it is necessary to calculate the overall image of multiple first thermal infrared images at any detection location within the pipeline site to obtain the model growth rate for each detection location. This model growth rate is the model preset parameter, used to construct the aforementioned background model. Then, by using the model growth rate corresponding to each detection location and multiple first thermal infrared images at that location to jointly construct the background model, a dynamically changing background model can be obtained. The aforementioned background model can be determined based on the initial model according to the aforementioned model preset parameters and multiple first thermal infrared images. Optionally, each first thermal infrared image has multiple pixels, and each pixel has the aforementioned first pixel value, thus allowing the aforementioned background model to be trained based on the multiple first thermal infrared images.

[0041] Step S203: Determine the moving target in the second thermal infrared image based on the background model and the second thermal infrared image. The moving target is used to characterize the leaking object in the transport pipeline.

[0042] Specifically, the second thermal infrared image is a thermal infrared image generated after multiple first thermal infrared images are used to construct the background model. This second thermal infrared image can be imported into the aforementioned background model, and the background model can analyze the imported second thermal infrared image to determine the moving target in the second thermal infrared image. The moving target represents a leaking object in the transport pipeline. The moving target corresponds to the second pixel value in the second thermal infrared image.

[0043] In this embodiment, multiple first thermal infrared images and second thermal infrared images can be acquired firstly. Then, based on the model's preset parameters and the first pixel values ​​of the multiple first thermal infrared images, a background model of the transport pipeline is determined. These preset parameters characterize the model's growth rate; therefore, the background model dynamically changes with changes in the pipeline environment. This background model can automatically monitor the transport pipeline based on the second thermal infrared images, thereby identifying moving targets in the second thermal infrared images. These moving targets can then be used to characterize leaking objects in the transport pipeline. In summary, the background model of this application has strong anti-interference capabilities and can effectively extract moving targets even in backgrounds with slight movement. This solves the problem of not being able to detect leaks in transport pipelines in a timely and accurate manner, effectively ensuring the safety of inspection personnel. Furthermore, the detection method of this application has a high degree of intelligence, enabling all-weather pipeline monitoring and handling nighttime and inclement weather conditions, significantly reducing manpower consumption.

[0044] It is understandable that the temperature of the transported objects in the pipeline is significantly different from the ambient temperature of the pipeline, thus allowing the pipeline to be detected based on thermal infrared images.

[0045] For example, the temperature of the transported object in the transport pipeline is significantly higher than the ambient temperature of the transport pipeline.

[0046] For example, the aforementioned transport pipeline can be a pipeline for transporting coal gas and pulverized coal.

[0047] Optionally, such as Figure 3 As shown, before using multiple first thermal infrared images to construct a background model, and between using second thermal infrared images to analyze moving targets, the first and second thermal infrared images can be preprocessed. This preprocessing can include POI selection, image grayscale conversion, image filtering and denoising, and infrared image enhancement. Infrared image enhancement can include spatial domain enhancement and frequency domain enhancement. Then, the preprocessed first and second thermal infrared images are used for image background processing (constructing a background model, i.e., mean background) and image foreground processing (determining moving targets, i.e., foreground extraction).

[0048] In specific implementation, step S202 can be achieved through the following steps: determining whether the first pixel value is less than a first preset threshold and greater than a second preset threshold, where the first preset threshold is the maximum pixel value set in the initial model and the second preset threshold is the minimum pixel value set in the initial model; if the first pixel value is less than the first preset threshold and greater than the second preset threshold, determining a first parameter based on the first pixel value and the current maximum pixel value in the initial model, determining a second parameter based on the first pixel value and the current minimum pixel value in the initial model, determining a third parameter based on the sum of the first pixel value, the model preset parameter, and the first threshold, and determining a fourth parameter based on the difference between the first pixel value, the model preset parameter, and the first threshold, and so on. The initial model is trained using the first, second, third, and fourth parameters to obtain the first background model. The current maximum pixel value is less than or equal to the maximum pixel value, and the current minimum pixel value is greater than or equal to the minimum pixel value. If the first pixel value is greater than or equal to the first preset threshold or less than or equal to the second preset threshold, the fifth and sixth parameters are both determined to be the first pixel value. The seventh parameter is determined based on the sum of the first pixel value and the model preset parameters. The eighth parameter is determined based on the difference between the first pixel value and the model preset parameters. The initial model is trained using the fifth, sixth, seventh, and eighth parameters to obtain the second background model. The background model includes the first background model and the second background model.

[0049] The initial model in this method can be optimized based on multiple first thermal infrared images to obtain a background model more suitable for pipeline inspection tasks. Specifically, the initial model can iterate through each first pixel value of multiple first thermal infrared images. In some optional embodiments, the step of determining the background model of the pipeline based at least on model preset parameters and the first pixel values ​​of multiple first thermal infrared images may include: determining whether the first pixel value is less than the maximum pixel value (first preset threshold) set by the initial model and greater than the minimum pixel value (second preset threshold) set by the initial model; if the first pixel value is less than the first preset threshold and greater than the second preset threshold, determining a first background model based at least on model preset parameters, multiple first thermal infrared images and the first threshold; if the first pixel value is greater than or equal to the first preset threshold or less than or equal to the second preset threshold, determining a second background model based at least on model preset parameters and multiple first thermal infrared images. The background model includes the first background model and the second background model.

[0050] For example, an initial model can be established for each pixel of the first thermal infrared image. Each initial model can be a coding structure CB, and each coding structure CB is composed of multiple code elements CW. Each coding structure also contains a time tag t, indicating the number of times the coding structure (initial model) has been updated, which facilitates the removal of old code elements to optimize the initial model. Specifically, the above coding structure CB can take the following form:

[0051] ,

[0052] in, The above encoding structure CB contains n code elements, and generally n ≤ 30. For example, if the location of the transport pipeline is fixed and the environmental changes are not particularly drastic, n = 15 can be used.

[0053] Specifically, each symbol in the above coding structure CB can take the following form:

[0054] ,

[0055] in, , These are the current maximum and minimum pixel values ​​of the current symbol corresponding to the first pixel value of the first thermal infrared image during background model optimization. They can be continuously updated during the background model optimization process and used to determine whether a pixel falls into the image region corresponding to the foreground object or the image region corresponding to the background object when segmenting foreground and background objects. and The two parameters are the first preset threshold (maximum pixel value threshold) and the second preset threshold (minimum pixel value threshold) set each time the background model is optimized. These first and second preset thresholds are used to determine whether a new pixel belongs to the specified pixel range when it arrives. .

[0056] Specifically, express The last time it was updated, Then record The longest time that the state has not been updated, i.e. For example, in The update time can be In this case, The last update time can be For example, The longest time without an update is and The duration between events. Optionally, if the background changes are minimal, a duration can be selected. That's all.

[0057] Further, when the first pixel value is less than a first preset threshold and greater than a second preset threshold, the step of determining the first background model based at least on model preset parameters, multiple first thermal infrared images, and the first threshold may include: determining the largest pixel value among the first pixel value and the current largest pixel value in the initial model as a first parameter; determining the first pixel value and the current smallest pixel value in the initial model as a second parameter; determining the sum of the first pixel value, the model preset parameters, and the first threshold as a third parameter; determining the difference between the first pixel value, the model preset parameters, and the first threshold as a fourth parameter; and then training the initial model using the first parameter, the second parameter, the third parameter, and the fourth parameter to obtain the first background model. For example, the first parameter may be... The second parameter mentioned above can be The third parameter mentioned above can be The fourth parameter mentioned above can be .

[0058] Further, when the first pixel value is greater than or equal to a first preset threshold or less than or equal to a second preset threshold, the step of determining the second background model based at least on model preset parameters and multiple first thermal infrared images may include: determining a fifth parameter and a sixth parameter based on the first pixel value, i.e., setting the fifth and sixth parameters using the first pixel value, determining the sum of the first pixel value and the model preset parameters as a seventh parameter, determining the difference between the first pixel value and the model preset parameters as an eighth parameter, and then training the initial model using the fifth, sixth, seventh, and eighth parameters to obtain the second background model. For example, the aforementioned fifth parameter may be... The sixth parameter mentioned above can be The seventh parameter mentioned above can be The eighth parameter mentioned above can be .

[0059] For example, a model preset parameter (model growth rate) can be initialized first. Furthermore, since the model's preset parameters are mainly derived from the pipeline's on-site environment—meaning the characteristic distribution of the transport pipeline varies significantly at different detection locations—it is necessary to calculate the overall image of the first thermal infrared image at the current detection location to set the model growth rate of the modeling model (the background model during optimization).

[0060] ,in, , ,

[0061] Among them, the above Let M be the first pixel value of the first thermal infrared image, M be the length of the first thermal infrared image, and N be the width of the first thermal infrared image. The average value of the first thermal infrared image. grayscale The proportion, To indicate rounding down, the above... The above is used to characterize the standard deviation of the image. Information entropy is used to characterize an image.

[0062] Furthermore, such as Figure 4 As shown, the operation of determining the background model based on the model's preset parameters and the first pixel values ​​of multiple first thermal infrared images can be as follows: setting the refresh time. Then, iterate through each first pixel value in the first thermal infrared image and perform a process for each first pixel value. Traverse its corresponding encoding structure Each symbol CW (i.e., modeling the image sequence) is processed using the following logic:

[0063] (1) Number of visits Add 1 (i.e., t+1).

[0064] (2) Traversal Each of them If there exists a Its satisfaction If the corresponding code exists, then proceed to (4) (i.e., if there is a corresponding code element), otherwise proceed to (3).

[0065] (3) Create a new code element ,That and All assigned values ,and , , , (i.e., if the corresponding code element does not exist, create a new code element), and go to (5).

[0066] (4) Update the parameters of the symbol (i.e., if the corresponding symbol exists, update the corresponding symbol): ,and:

[0067]

[0068] Update the learning upper and lower bounds of the code elements, and take , .

[0069] (5) Simplify the code elements according to their obsolescence time and update each code element. of If the current code element being traversed is If the code element is older than T, delete it (i.e., if the code element's obsolescence time is greater than T, delete the corresponding code element); otherwise, keep it (if the code element's obsolescence time is less than or equal to T, keep the code element in the encoding structure). This yields the final codebook and completes the background modeling.

[0070] It is understandable that the aforementioned first threshold is 1, and the aforementioned first parameter or fifth parameter can be one of the above. The second or sixth parameter mentioned above can be one of the above. The third or seventh parameter mentioned above can be one of the above. The fourth or eighth parameter mentioned above can be one of the above. .

[0071] In some optional implementations, step S203 can be specifically implemented through the following steps: sequentially determining whether each second pixel value in the second thermal infrared image is located within a preset interval to obtain a second determination result. The preset interval has a first end value and a second end value. The first end value is the sum of a first parameter and a second threshold, and the second end value is the difference between the second parameter and a third threshold. The second threshold is the maximum critical value for segmenting foreground and background objects in the second thermal infrared image, and the third threshold is the minimum critical value for segmenting foreground and background objects. If the second determination result indicates that the target second pixel value is located within the preset interval, the target second pixel value is determined to belong to the background object. If the second determination result indicates that the target second pixel value is not located within the preset interval, the target second pixel value is determined to belong to the foreground object, where the foreground object is used to represent a moving target. That is, the above steps use the background subtraction method to segment the foreground and background objects.

[0072] Among them, such as Figure 5 As shown, in the step of determining the background model of the transport pipeline based at least on the model preset parameters and the first pixel values ​​of multiple first thermal infrared images, the background model can be a first background model (i.e., background modeling, which may include codebook initialization and code element update) determined at least based on the model preset parameters and the first pixel values ​​of multiple first thermal infrared images (i.e., the modeling image sequence). Specifically, the first background model has a first parameter and a second parameter. Based on the first background model, each second pixel value in the aforementioned second thermal infrared image is traversed to determine whether each second pixel value is located within a preset interval (a pixel interval composed of multiple pixel values). The preset interval is used to separate foreground objects and background objects in the second thermal infrared image. For example, a target second pixel value (the target second pixel value is any second pixel value in the second thermal infrared image that is currently being compared with the preset interval) located within the preset interval in the second thermal infrared image is represented as a background object, while a target second pixel value not located within the preset interval in the second thermal infrared image is represented as a foreground object. The foreground object is the leaking object in the transport pipeline, thereby enabling the location of the leaking object in the transport pipeline to be determined based on the target second pixel value. Optionally, the preset interval has a first end value and a second end value. The first end value is the sum of the first parameter and the second threshold, and the second end value is the difference between the second parameter and the third threshold. The first end value is greater than the second end value, and the pixel value within the preset interval is less than or equal to the first end value and greater than or equal to the second end value.

[0073] Specifically, such as Figure 5As shown, the principle of segmenting the second pixel value (the image sequence to be detected) in the second thermal infrared image into foreground or background objects using the first background model or the second background model can still be the background subtraction method (i.e., foreground segmentation). Furthermore, the aforementioned background model (first background model or second background model) can be used to traverse each second pixel value of the second thermal infrared image. For example, each symbol CW in the encoding structure CB corresponding to the background model is traversed, and the second pixel value is determined. Does it meet the following conditions:

[0074] ,

[0075] Furthermore, if the second pixel value meets the above conditions, it can be determined that the second pixel is a background object in the second thermal infrared image; otherwise, the second pixel is a foreground object in the second thermal infrared image. The first parameter of the above background model, The second parameter of the aforementioned background model, The maximum pixel value (second threshold) is used to determine whether an object in the image is in the foreground. To determine the minimum pixel value (third threshold) for identifying an object as foreground in an image, the above... and The threshold segmentation was set up before the second thermal infrared image was detected.

[0076] In some alternative embodiments, step S203 may be implemented further by the following steps: sequentially determining whether each second pixel value in the second thermal infrared image is located within a preset interval to obtain a second determination result. The preset interval has a first end value and a second end value. The first end value is the sum of the fifth parameter and the second threshold, and the second end value is the difference between the second parameter and the third threshold. The second threshold is the maximum critical value for segmenting foreground objects and background objects in the second thermal infrared image, and the third threshold is the minimum critical value for segmenting foreground objects and background objects. If the second determination result indicates that the target second pixel value is located within the preset interval, the target second pixel value is determined to belong to the background object. If the second determination result indicates that the target second pixel value is not located within the preset interval, the target second pixel value is determined to belong to the foreground object, and the foreground object is used to represent a moving target.

[0077] Similarly, in the step of determining the background model of the transport pipeline based at least on the model preset parameters and the first pixel values ​​of multiple first thermal infrared images, the background model can be a second background model determined based at least on the model preset parameters and the first pixel values ​​of multiple first thermal infrared images. Specifically, the second background model has a fifth parameter and a sixth parameter. Based on the second background model, each second pixel value in the aforementioned second thermal infrared image is traversed to determine whether each second pixel value is located within a preset interval (a pixel interval composed of multiple pixel values). The preset interval is used to separate foreground objects and background objects in the second thermal infrared image. For example, a target second pixel value in the second thermal infrared image located within the preset interval (the target second pixel value is any second pixel value in the second thermal infrared image that is currently being compared with the preset interval) is represented as a background object, while a target second pixel value in the second thermal infrared image not located within the preset interval is represented as a foreground object. The foreground object is the leaking object in the transport pipeline, thereby enabling the location of the leaking object in the transport pipeline to be determined based on the target second pixel value. Optionally, the preset interval has a first end value and a second end value. The first end value is the sum of the fifth parameter and the second threshold, and the second end value is the difference between the sixth parameter and the third threshold. The first end value is greater than the second end value, and the pixel value within the preset interval is less than or equal to the first end value and greater than or equal to the second end value.

[0078] In some alternative implementations, such as Figure 5 As shown, when detecting the second thermal infrared image using the background subtraction method in the background model, the background subtraction method generally has high sensitivity and can detect pixel-level motion. However, when a transportation pipeline leaks, the area of ​​irregular smoke diffusion is generally much larger than this level, which can easily lead to false detections. Therefore, to prevent false detections caused by noise, morphological processing is considered on the image corresponding to the extracted foreground object. That is, while identifying the foreground object in the second thermal infrared image, the Otsu's method (OTSU) can be used to binarize the image. Furthermore, in order to calculate and label the number of regions with moving targets (i.e., infrared moving targets), connectivity analysis (i.e., connected component analysis) can be performed on the image after the above morphological processing. Optionally, the seed filling method can be used for connectivity analysis.

[0079] Specifically, the above morphological processing may include: in order to remove small noise and burrs, the following opening operation is used to erode and then dilate the image. The second thermal infrared image P of the detected foreground object is processed using erosion operator A and dilation operator B, with each iteration only needing to be performed once:

[0080] ,

[0081] in, This represents the erosion operation. This represents the dilation operation, where x represents any pixel in the second infrared image.

[0082] Optionally, the erosion operator A can be a 3×3 rectangular convolution kernel, i.e. Meanwhile, to facilitate visual observation of the region corresponding to the extracted foreground object, the dilation operator B uses a 15×15 rectangular convolution kernel, i.e. .

[0083] For example, to reduce computational load and increase algorithm real-time performance, the connectivity analysis of the above seed filling method can be performed using four connected components: select a pixel of the foreground object as the seed, and based on the basic conditions of connected components (two adjacent pixel values ​​are the same and their positions are adjacent), merge pixels adjacent to the seed into the same set to obtain a connected component. Furthermore, by traversing the aforementioned second thermal infrared image, all connected regions in the second thermal infrared image can be obtained, and these regions are marked as the identified leakage areas.

[0084] In some optional implementations, before the step of determining the background model of the transport pipeline based on model preset parameters and the first pixel values ​​of multiple first thermal infrared images, the method further includes: enlarging the initial pixel values ​​of the first thermal infrared images according to a preset ratio to obtain first preliminary pixel values; determining whether the first preliminary pixel values ​​are greater than a preset pixel threshold; if the first preliminary pixel values ​​are greater than the preset pixel threshold, determining the second preliminary pixel value of the first thermal infrared image to be 0; if the first preliminary pixel values ​​are less than or equal to the preset pixel threshold, determining the second preliminary pixel value to be 255, so as to obtain a binary image corresponding to the first thermal infrared image; performing dilation processing on the binary image to obtain a third preliminary pixel value of the mask template of the first thermal infrared image; and performing masking operations based on the initial pixel values ​​and the third preliminary pixel values ​​to obtain the first pixel values.

[0085] In the above embodiments, the first thermal infrared image generated by the infrared thermal imager can be processed as a single frame image. First, the image is converted to grayscale to obtain the initial pixel values. Then, to simply and effectively highlight some detailed information in the first thermal infrared image, each pixel of the first thermal infrared image can be traversed according to a preset ratio to obtain first reserve pixel values ​​with highlighted detailed information. Then, a binarization method can be used to traverse each first reserve pixel value to update the first reserve pixel value to a second reserve pixel value. Specifically, it is determined whether the first reserve pixel value is greater than a preset pixel threshold, and the first reserve pixel values ​​in the first thermal infrared image that are greater than the preset pixel threshold are determined to be 0, while the first reserve pixel values ​​in the first thermal infrared image that are less than or equal to the preset pixel threshold are determined to be... The value is 255, thus obtaining a binarized image with the first thermal infrared image. Furthermore, to prevent the background model from incorrectly identifying obstacles in the first thermal infrared image as leaking objects in the transport pipeline due to obstructions (such as human bodies), the binarized image can be dilated to determine a mask template corresponding to the obstacle. This mask template has a third pre-selected pixel value. To further eliminate the background model's incorrect identification of obstacles in the first thermal infrared image as leaking objects due to obstructions, mask operations can be used to process the initial pixel value and the third pre-selected pixel value to obtain a first pixel value. This first pixel value can significantly reduce the error rate in identifying leaking objects. It should be noted that the monitoring temperature range of the infrared thermal imager is 50~100℃, the temperature of human obstacles generally does not exceed 37℃, and the average pipeline temperature at the pipeline site is around 100℃.

[0086] Specifically, the initial pixel values ​​of the first thermal infrared image after grayscale conversion can be denoted as: The first preparatory pixel value can then be calculated using the following formula:

[0087] ,

[0088] in, The value is represented as the first prepared pixel value, and k is a preset ratio (i.e., a pixel method multiple; optionally, the value of k can be obtained through multiple verifications; for example, the range of the value of k can be 7.5~10). The larger the value of k, the more obvious the masking effect.

[0089] Specifically, the second preliminary pixel value can be calculated using the following formula:

[0090] ,

[0091] Among them, the above This is represented as the second preparatory pixel value. This represents the preset pixel threshold.

[0092] Specifically, the binarized image can be dilated using the following formula to determine the mask template corresponding to the obstacle:

[0093] ,

[0094] Among them, the above The value is represented as the third preparatory pixel value corresponding to the mask template. A represents the structuring element in the dilation process. For example, the structuring element A can be a 3×3 structuring element.

[0095] In some alternative embodiments, the above-described method for detecting transport pipelines based on thermal infrared images may further include: upon determining a moving target in the second thermal infrared image, outputting a control signal to an alarm device to cause the alarm device to output an alarm signal.

[0096] In some alternative embodiments, the above-described method for detecting transport pipelines based on thermal infrared images may further include: recording a first thermal infrared image and a second thermal infrared image.

[0097] This application also provides a pipeline inspection device based on thermal infrared images. It should be noted that this pipeline inspection device based on thermal infrared images can be used to execute the pipeline inspection method based on thermal infrared images provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0098] The following describes the pipeline inspection device based on thermal infrared images provided in the embodiments of this application.

[0099] Figure 6 This is a schematic diagram of a transport pipeline detection device based on thermal infrared images according to an embodiment of this application. Figure 6 As shown, the device includes:

[0100] The acquisition unit 10 acquires multiple first thermal infrared images and second thermal infrared images. The multiple first thermal infrared images are thermal infrared images of the detection position on the transport pipeline at different times within a preset time interval, and the second thermal infrared image is the thermal infrared image of the detection position at the current time after the preset time interval.

[0101] Modeling unit 20 is used to determine the background model of the transport pipeline based at least on the model preset parameters and the first pixel values ​​of multiple first thermal infrared images. The model preset parameters are used to characterize the model growth rate of the background model.

[0102] The monitoring unit 30 is used to determine the moving target in the second thermal infrared image based on the background model and the second thermal infrared image. The moving target is used to characterize the leaking object in the transport pipeline.

[0103] The pipeline inspection device based on thermal infrared images includes a processor and a memory. The acquisition unit 10, modeling unit 20, and monitoring unit 30 are all stored as program units in the memory. The processor executes these program units stored in the memory to achieve their respective functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.

[0104] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, leaks in the transport pipeline and their locations can be detected promptly and accurately.

[0105] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0106] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform a transportation pipeline detection method based on thermal infrared images.

[0107] This invention provides a pipeline inspection system based on thermal infrared images, such as... Figure 7 As shown, it includes: an infrared thermal imager 100, used to generate thermal infrared images of the detection location on the transport pipeline, wherein the thermal infrared images include multiple first thermal infrared images and second thermal infrared images, wherein the multiple first thermal infrared images are thermal infrared images of the detection location at different times within a preset time interval, and the second thermal infrared images are thermal infrared images of the detection location at the current time after the preset time interval; and a monitoring server 101, which is communicatively connected to the infrared thermal imager 100, used to acquire multiple first thermal infrared images and second thermal infrared images, and determine the background model of the transport pipeline based at least on model preset parameters and the first pixel values ​​of multiple first thermal infrared images, and determine the moving target in the second thermal infrared image based on the background model and the second thermal infrared image, wherein the model preset parameters are used to characterize the model growth rate of the background model, and the moving target is used to characterize the leaking object in the transport pipeline.

[0108] Optionally, the aforementioned infrared thermal imager 100 may include multiple devices, and each infrared thermal imager 100 is connected to the aforementioned monitoring server 101. Optionally, the aforementioned infrared thermal imager 100 may be a dual-light explosion-proof infrared thermal imager 100.

[0109] Because the system includes an infrared thermal imager 100, it can generate first and second thermal infrared images at the detection location of the pipeline. Furthermore, since the infrared thermal imager 100 is connected to the monitoring server 101, it can determine the background model of the transport pipeline based on preset model parameters and the first pixel values ​​of multiple first thermal infrared images. These preset parameters characterize the growth rate of the background model, thus dynamically changing with changes in the pipeline site. The background model can then automatically monitor the transport pipeline based on the second thermal infrared image, identifying moving targets within it. These moving targets can then be used to characterize leaking objects in the transport pipeline. In summary, the background model of this application has strong anti-interference capabilities and can effectively extract moving targets even in slightly moving backgrounds, thus solving the problem of not being able to detect leaks in transport pipelines promptly and accurately, effectively ensuring the safety of inspection personnel. Moreover, the detection method of this application is highly intelligent, capable of monitoring pipelines around the clock and coping with nighttime and inclement weather, significantly reducing manpower consumption.

[0110] In some alternative implementations, such as Figure 7 As shown, in order to establish a high-speed and stable signal transmission channel, the above-mentioned pipeline inspection system based on thermal infrared images may further include: a switch 102, having a first input port and a first output port, the first input port being communicatively connected to multiple infrared thermal imagers 100, and the first output port being communicatively connected to a monitoring server 101.

[0111] In some alternative implementations, such as Figure 7 As shown, the optical transceiver includes an optical transmitter 103 and an optical receiver 104. Since the optical transmitter 103 and the optical receiver 104 use optical fiber with a long transmission distance for transmission, in order to transmit the first thermal infrared image or the second thermal infrared image to the remote switch 102, the above-mentioned transport pipeline detection system based on thermal infrared images may further include: an optical transmitter 103 having a second input port and a second output port, the second input port being communicatively connected to the infrared thermal imager 100; and an optical receiver 104 having a third input port and a third output port, the third input port being communicatively connected to the second output port, and the third output port being communicatively connected to the switch 102.

[0112] In some alternative implementations, such as Figure 7 As shown, in order to record and store the first and second thermal infrared images for timely review, the aforementioned pipeline inspection system based on thermal infrared images may further include: a storage device 105 having a fourth input port and a fourth output port, the fourth input port being communicatively connected to a switch 102; and a monitoring device 106 being signal-connected to the fourth output port. Optionally, the storage device 105 may be a hard disk recorder; alternatively, the storage device 105 may also include an optical engine. In this embodiment, by connecting the storage device 105 to the monitoring device 106 at a more remote location, monitoring personnel can view the visible light images of the pipeline site using both real-time viewing and playback viewing methods.

[0113] In some optional embodiments, to promptly report pipeline leaks and their locations, the aforementioned pipeline detection system based on thermal infrared images may further include an alarm system 107, signal-connected to the monitoring server 101, for alarm processing upon determining the presence of a moving target in the second thermal infrared image. Optionally, the PCI-1752 module of the monitoring server 101 is used to send control signals to the alarm system 107 with minimal delay. Further, the PCI-1752 module may also be externally connected to an ADAM-3951 module and a relay to provide switching signals, which are then connected to the alarm system 107 for wider alarm coverage. Optionally, the alarm system 107 may be a DCS system.

[0114] In the above embodiments, such as Figure 7 As shown, the pipeline inspection system based on thermal infrared images, including the aforementioned infrared thermal imager 100, monitoring server 101, switch 102, optical transmitter 103, optical receiver 104, storage device 105, monitoring device 106, and alarm system 107, can realize multi-directional and comprehensive monitoring of the pipeline on-site, including functions such as playback, real-time monitoring, alarm, and alarm backtracking. Furthermore, the various parts of the pipeline inspection system based on thermal infrared images have good compatibility and low latency, enabling the system to operate stably for a long time.

[0115] This application also provides a computer program product that, when executed on a data processing device, is adapted to execute a program that initializes a method for detecting a transport pipeline based on at least thermal infrared images.

[0116] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0117] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0119] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0120] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0121] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0122] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0123] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0124] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0125] As can be seen from the above description, the embodiments of this application achieve the following technical effects:

[0126] In this embodiment, multiple first thermal infrared images and second thermal infrared images can be acquired firstly. Then, based on the model's preset parameters and the first pixel values ​​of the multiple first thermal infrared images, a background model of the transport pipeline is determined. These preset parameters characterize the model's growth rate; therefore, the background model dynamically changes with changes in the pipeline environment. This background model can automatically monitor the transport pipeline based on the second thermal infrared images, thereby identifying moving targets in the second thermal infrared images. These moving targets can then be used to characterize leaking objects in the transport pipeline. In summary, the background model of this application has strong anti-interference capabilities and can effectively extract moving targets even in backgrounds with slight movement. This solves the problem of not being able to detect leaks in transport pipelines in a timely and accurate manner, effectively ensuring the safety of inspection personnel. Furthermore, the detection method of this application has a high degree of intelligence, enabling all-weather pipeline monitoring and handling nighttime and inclement weather conditions, significantly reducing manpower consumption.

[0127] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for detecting a transport pipeline based on thermal infrared images, characterized in that, The method comprises: acquiring a plurality of first thermal infrared images and a second thermal infrared image, the plurality of first thermal infrared images being thermal infrared images of a detection position on a transportation pipeline at different time instants within a preset time interval, and the second thermal infrared image being a thermal infrared image of the detection position at a current time after the preset time interval; determining a background model of the transportation pipeline according to at least a model preset parameter and first pixel values of the plurality of first thermal infrared images, the model preset parameter being used to represent a model growth rate of the background model; determining a moving target in the second thermal infrared image according to the background model and the second thermal infrared image, the moving target being used to represent a leakage object of the transportation pipeline. The method further comprises: determining whether the first pixel value is less than a first preset threshold and greater than a second preset threshold, the first preset threshold being a maximum pixel value set in an initial model, and the second preset threshold being a minimum pixel value set in the initial model; in a case where the first pixel value is less than the first preset threshold and greater than the second preset threshold, determining a first parameter according to the first pixel value and a current maximum pixel value in the initial model, determining a second parameter according to the first pixel value and a current minimum pixel value in the initial model, determining a third parameter according to a sum of the first pixel value, the model preset parameter and a first threshold, determining a fourth parameter according to a difference between the first pixel value, the model preset parameter and the first threshold, and training the initial model according to the first parameter, the second parameter, the third parameter and the fourth parameter to obtain a first background model, the current maximum pixel value being less than or equal to the maximum pixel value, the current minimum pixel value being greater than or equal to the minimum pixel value, and the first threshold being 1; in a case where the first pixel value is greater than or equal to the first preset threshold or the first pixel value is less than or equal to the second preset threshold, setting a fifth parameter and a sixth parameter using the first pixel value, determining a seventh parameter according to a sum of the first pixel value and the model preset parameter, determining an eighth parameter according to a difference between the first pixel value and the model preset parameter, and training the initial model according to the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter to obtain a second background model, the background model comprising the first background model and the second background model.

2. The method of claim 1, wherein, The method further comprises: sequentially judging whether each second pixel value in the second thermal infrared image is located in a preset interval to obtain a second judgment result, the preset interval having a first end value and a second end value, the first end value being a sum of the first parameter and a second threshold value, the second end value being a difference between the second parameter and a third threshold value, the second threshold value being a maximum critical value for segmenting foreground objects and background objects in the second thermal infrared image, and the third threshold value being a minimum critical value for segmenting the foreground objects and the background objects; in a case where the second judgment result indicates that a target second pixel value is located in the preset interval, determining that the target second pixel value belongs to the background objects; in a case where the second judgment result indicates that the target second pixel value is not located in the preset interval, determining that the target second pixel value belongs to the foreground objects, the foreground objects being used to represent the moving target, and the target second pixel value being any one of the second pixel values in the second thermal infrared image which is compared with the preset interval at this time.

3. The method of claim 1 or 2, wherein, Before the step of determining the background model of the transportation pipeline according to at least the model preset parameter and the first pixel values of the plurality of first thermal infrared images, the method further comprises: enlarging initial pixel values of the first thermal infrared image according to a preset ratio to obtain first preliminary pixel values; judging whether the first preliminary pixel values are greater than a preset pixel threshold value, in a case where the first preliminary pixel values are greater than the preset pixel threshold value, determining that second preliminary pixel values of the first thermal infrared image are 0, and in a case where the first preliminary pixel values are less than or equal to the preset pixel threshold value, determining that the second preliminary pixel values are 255, to obtain a binary image corresponding to the first thermal infrared image; performing inflation processing on the binary image to obtain third preliminary pixel values of a mask template of the first thermal infrared image; performing mask operation according to the initial pixel values and the third preliminary pixel values to obtain the first pixel values.

4. A thermal infrared image-based pipeline inspection apparatus for performing the thermal infrared image-based pipeline inspection method according to any one of claims 1 to 3, characterized in that The method comprises: an acquisition unit, which acquires a plurality of first thermal infrared images and a second thermal infrared image, the plurality of first thermal infrared images being thermal infrared images at different times within a preset time interval at a detection position on a transportation pipeline, and the second thermal infrared image being a thermal infrared image at a current time after the preset time interval at the detection position; a modeling unit, which is configured to determine a background model of the transportation pipeline according to at least a model preset parameter and first pixel values of the plurality of first thermal infrared images, the model preset parameter being used to represent a model growth rate of the background model; a monitoring unit, which is configured to determine a moving target in the second thermal infrared image according to the background model and the second thermal infrared image, the moving target being used to represent a leakage object of the transportation pipeline.

5. A computer readable storage medium, characterized in that, The computer-readable storage medium comprises a stored program, wherein the program controls a device in which the computer-readable storage medium is located to perform the method for detecting a transportation pipeline based on thermal infrared images according to any one of claims 1 to 3 when the program is executed.

6. A thermal infrared image-based pipeline inspection system for performing the method of any one of claims 1 to 3, characterized in that The method comprises: An infrared thermal imager is configured to generate a thermal infrared image at a detection position on a transportation pipeline, wherein the thermal infrared image comprises a plurality of first thermal infrared images and a second thermal infrared image, the plurality of first thermal infrared images are thermal infrared images at different time instants within a preset time interval at the detection position, and the second thermal infrared image is a thermal infrared image at a current time after the preset time interval at the detection position; A monitoring server is communicatively connected to the infrared thermal imager, configured to acquire the plurality of first thermal infrared images and the second thermal infrared image, determine a background model of the transportation pipeline according to at least a model preset parameter and first pixel values of the plurality of first thermal infrared images, and determine a moving target in the second thermal infrared image according to the background model and the second thermal infrared image, wherein the model preset parameter is used to represent a model growth rate of the background model, and the moving target is used to represent a leakage object of the transportation pipeline.

7. The transit pipe inspection system of claim 6, wherein, Further comprising: A switch having a first input port and a first output port, the first input port being communicatively connected to the plurality of infrared thermal imagers, and the first output port being communicatively connected to the monitoring server.

8. The transit pipe inspection system of claim 7, wherein, Further comprising: An optical end transmitter having a second input port and a second output port, the second input port being communicatively connected to the infrared thermal imager; An optical end receiver having a third input port and a third output port, the third input port being communicatively connected to the second output port, and the third output port being communicatively connected to the switch.

9. A transit pipe inspection system according to claim 7 or 8, characterised in that, Further comprising: A storage device having a fourth input port and a fourth output port, the fourth input port being communicatively connected to the switch; A monitoring device being signal connected to the fourth output port.

10. The transit pipe inspection system of any one of claims 6 to 8, wherein, Further comprising: An alarm system being signal connected to the monitoring server, configured to perform alarm processing when the moving target in the second thermal infrared image is determined to exist.

Citation Information

Patent Citations

  • Positioning method of working object and target of substation based on infrared and visible light fusion

    CN108665487A

  • Multi-scale based background modeling infrared dynamic SF6 gas detection method

    CN110849876A

  • Offshore platform pipeline gas leakage identification method based on image identification and infrared thermal imaging technologies

    CN112610905A

  • Thermal infrared gas leakage detection method, detection device and detection system based on YOLOV5

    CN114298989A