VOCs gas leakage detection device and method based on infrared gas imaging
By combining infrared gas imaging, intelligent detection algorithms and laser ranging technology, the existing gas leakage detection methods have been solved, and the accurate positioning and quantitative detection of VOCs gas leakage is achieved.
Patent Information
- Application Number
- CN202411672193.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Existing gas leakage detection methods are susceptible to environmental interference and have poor detection accuracy, especially in complex environments, weak leakage gas recognition ability and poor visualization effect.
The VOCs gas leakage detection method based on infrared gas imaging is adopted, and infrared gas imager, intelligent detection algorithm and laser ranging technology are combined to identify the leakage area through video stability determination, frame difference enhancement and target segmentation technology, and quantitative detection is performed with laser ranging.
Accurate positioning and quantitative detection of VOCs leakage points is achieved, which improves the comprehensiveness and practicality of the detection, reduces the risk of weak or small flow gas leakage detection, and improves the visualization effect through color rendering.
Smart Images

Figure CN119643054A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas leakage detection, and in particular to a VOCs gas leakage detection device and method based on infrared gas imaging. Background Art
[0002] With the rapid development of industrialization and urbanization, the emission of volatile organic compounds (VOCs) has become increasingly prominent. Excessive concentration of VOCs in the air will cause serious harm to the environment and human health. Therefore, timely detection and monitoring of VOCs has become particularly important.
[0003] Traditional VOCs gas detection methods mainly rely on chemical sensors or laser measurement. Chemical sensors need to directly contact the sample being measured, and the measurement timeliness and safety are poor; laser measurement has high accuracy and efficiency, but is limited to single-point detection and cannot fully cover the leakage area, resulting in the inability to intuitively present the leakage area and leakage direction. Infrared imaging technology, as a non-contact, long-distance detection method, has the advantages of non-contact and long-distance monitoring, and is currently one of the research hotspots for VOCs gas leakage detection.
[0004] Infrared imaging technology detects and identifies targets by detecting the infrared radiation energy of target objects. It has good adaptability and sensitivity and has broad application prospects in the field of gas detection. However, the current infrared imaging gas detection technology still faces some challenges in practical applications, especially in the case of low concentration and low flow gas leakage, the existing recognition methods have serious misidentification. In order to overcome these challenges and improve detection accuracy and efficiency, it is necessary to further optimize and improve the traditional infrared image processing method to meet the actual detection needs.
[0005] Therefore, there are the following problems in gas leakage detection at present:
[0006] 1) Infrared imaging gas leak detection in complex environments is susceptible to environmental interference, and the detection accuracy and sensitivity of general algorithms are not high;
[0007] 2) The ability to identify weak leaking gases in complex environments is not strong, image algorithms such as interference removal are complex and computationally intensive, and real-time performance is difficult to guarantee during data processing;
[0008] 3) For small-flow gas leaks, the gas position and area cannot be accurately reflected, and the visualization effect is poor, which cannot truly reflect the gas leakage situation.
[0009] At present, there are some technologies based on infrared images for detecting and identifying leaking gas and completing the analysis of the leakage amount, but this method is mostly focused on identifying the leakage area using the moving target extraction algorithm. In terms of extracting the moving area, in order to separate the moving area, eliminate noise and exclude other interference, the threshold segmentation method is often used to binarize the moving area. The uncertainty of the threshold directly leads to the uncertainty of the subsequent extraction results, especially when there is a weak gas leak, it is more likely to miss the identification. In addition, in order to more effectively eliminate interfering targets, the method of joint analysis of infrared images and visible light images is also one of the commonly used methods. The common practice of this method is to align and fuse infrared and visible light data, and use the differences in infrared and visible light in spectral imaging to eliminate motion interference, but the application scenarios of this method are severely limited. For example, in dim light and at night, the algorithm cannot be used normally due to the influence of visible light imaging.
[0010] The invention patent with application number 202011353349.5 discloses an online detection system for VOCs leakage, which is used for online detection of VOCs leakage in the detection area, wherein the detection area is composed of multiple detection points; the online detection system includes: at least one image processing device, a data acquisition device, a data sampling device and a control device; the image processing device includes: an image acquisition module and an image processing module; the image acquisition module is used to collect image information of the detection area in real time; the image processing module is used to process the image information and determine the detection point where VOCs leakage occurs according to the image information; each detection point is provided with at least one data acquisition device and at least one data sampling device. The online detection system can detect VOCs leakage efficiently, timely and accurately. However, the above invention requires actual detection of the components and concentrations of the detection points, requires a gas pretreatment device, and the gas is cooled and water vapor is removed by the sampling device before further identification and detection can be performed. It only supports fixed online detection, but does not support handheld mobile, portable fixed or fixed online detection and other scenarios. Summary of the invention
[0011] In view of the technical problems that existing gas leakage detection methods are easily affected by environmental interference and have poor detection accuracy, the present invention proposes a VOCs gas leakage detection device and method based on infrared gas imaging, which combines an infrared gas imager, an intelligent detection algorithm and a laser ranging technology to achieve accurate positioning and quantitative detection of VOCs leakage points; it is non-contact and does not require component and concentration measurements of the detection points; it does not require a pre-processing process and can be directly used for gas detection in different leakage scenarios, with a richer range of applicable scenarios.
[0012] In order to achieve the above object, the technical solution of the present invention is implemented as follows: a VOCs gas leakage detection method based on infrared gas imaging, the steps of which are as follows:
[0013] S1: Use infrared gas imaging components to collect infrared videos of typical VOCs gas leaks, typical interferences, and rapid movement of infrared gas imaging components;
[0014] S2: Preprocess the infrared video containing VOCs gas leakage, obtain the frame difference result according to the preprocessed video, and perform data enhancement and annotation processing on the frame difference result to obtain the VOCs gas leakage data set;
[0015] S3: Preprocess the infrared video containing the interference target, obtain the frame image of typical interference, annotate the sample of the frame image of typical interference, and obtain the typical interference target data set;
[0016] S4: preprocessing the infrared video when the infrared gas imaging component moves rapidly, counting the projection change rate of the video frame when the infrared gas imaging component moves rapidly frame by frame, and obtaining a video stability determination threshold for determining whether the infrared gas imaging component is in a stable state;
[0017] S5: Use the VOCs leakage dataset and the typical interference target dataset to train the image segmentation model respectively, and obtain the VOCs leakage detection model and the interference target detection model respectively;
[0018] S6: using the infrared gas imaging component to collect real-time infrared video in the actual measurement environment and perform preprocessing, calculating the projection change rate of the preprocessed real-time infrared image, comparing the current image projection change rate with the video stability determination threshold obtained in step S4, if the current projection change rate is less than the video stability determination threshold, proceeding to step S7; otherwise, converting the real-time infrared image into an 8-bit image and storing it;
[0019] S7: After performing frame difference calculation and data enhancement on the pre-processed real-time infrared video frame, suspected leakage data is obtained;
[0020] S8: Input the preprocessed real-time infrared video frame into the interference target detection model to identify the interference target, and obtain the interference area and the probability value of the interference area; S9: Input the suspected leakage data obtained in step S7 into the VOCs leakage detection model to identify the VOCs leakage area, and obtain the VOCs leakage area and the probability value of the VOCs leakage area;
[0021] S10: performing difference processing on the interference area probability value and the leakage area probability value, and updating the VOCs leakage area probability value;
[0022] S11: sending the VOCs leakage area obtained in step S10 into the data queue for leakage area time series probability analysis, and obtaining the leakage mask area according to the set threshold;
[0023] S12: superimpose and analyze the leakage mask area obtained in step S11 and the latest frame difference result obtained in step S7 to obtain the leakage area; the laser ranging module obtains the target distance;
[0024] S13: Calculate the leakage area according to the number of pixels in the leakage area and the target distance obtained in step S12.
[0025] Preferably, the VOCs gas is selected from hydrocarbon volatile organic compounds, and the typical interference targets are selected from people, vehicles, trees, shrubs, and grass; the scenes selected as the video acquisition objects when the infrared gas imaging component moves quickly include indoor scenes and outdoor scenes;
[0026] The preprocessing in step S2, step S3 and step S6 is image digital detail enhancement, and the image digital detail enhancement uses a histogram-based infrared image enhancement algorithm to process the wide dynamic infrared image into a standard 8-bit image;
[0027] The data enhancement method in step S2 and step S7 is: performing percentage linear stretching and motion gradient calculation on the frame difference result in sequence;
[0028] The annotation processing is to perform sample annotation on each frame image data after merging the frame difference result and the motion gradient image after data enhancement to create a VOCs leakage data set.
[0029] Preferably, the method for obtaining the frame difference result according to the preprocessed video is: obtaining the frame difference result by using a frame difference method:
[0030] diff t =gray (x,y,t) -gray (x,y,t-1) ×k;
[0031] Among them, gray (x,y,t) and gray (x,y,t+1) Respectively represent the grayscale value at (x, y) of the infrared image preprocessed at time t and t+1 of the infrared video; diff t represents the frame difference result at time t; k represents the correction coefficient;
[0032] The implementation method of the percentage linear stretching is: determine the percentage stretching coefficient per, sort the grayscale values of the frame difference results, determine the grayscale values corresponding to the minimum percentage stretching coefficient per and the maximum percentage stretching coefficient (1-per) and mark them as a value and b value respectively; use the minimum adjustment percentage 0.01 and the maximum adjustment percentage 0.5 to update the a value and the b value to obtain new a' value and b' value, mark the b' value less than the a' value and greater than the b' value as the minimum noise and the maximum noise; stretch the frame difference results and remove the noise.
[0033] Preferably, the minimum adjustment percentage 0.01 and the maximum adjustment percentage 0.5 are used to update the a value and the b value, and the method for obtaining the new a' value and the b' value is:
[0034] a′=a-(ba)*0.01
[0035] b′=b+(ba)*0.5
[0036] The method for stretching and removing noise from the frame difference result is:
[0037]
[0038] Among them, diff (x,y) 、new_gray (x,y) Respectively represent the frame difference result at (x, y) and the pixel value of the grayscale image after percentage stretching;
[0039] The implementation method of the motion gradient calculation is:
[0040] Extract the gradient direction matrix: Among them, the horizontal gradient is: The vertical gradient is The horizontal convolution kernel is Vertical convolution kernel new_gray is the grayscale image after percentage linear stretching;
[0041] Convert the gradient direction matrix θ into standard 8-bit unsigned integer image data to obtain the standardized motion gradient image:
[0042]
[0043] The image merging is to perform band superposition of the frame difference result and the standardized motion gradient image after data enhancement.
[0044] Preferably, the method for counting the projection change rate of the video frame during fast movement frame by frame in step S4 is: according to the pre-processed infrared video k-th frame row direction grayscale projection matrix Row k , the row-wise grayscale projection matrix Row of the k-1th framek-1 ; Grayscale projection standard deviation matrix S in the row direction of the kth frame row,k , the standard deviation matrix of the grayscale projection in the row direction of the k-1th frame is S row,k-1 , calculate the rate of change of the projection matrix in the row direction:
[0045]
[0046] The method for calculating the projection change rate of the preprocessed real-time infrared image in step S6 is the same as the method for calculating the projection matrix change rate in the row direction of the video frame in step S4;
[0047] The method for obtaining the threshold value for determining whether the device is in a stable state is as follows: the projection matrix change rate C of the captured infrared video during fast movement is counted frame by frame, and the average value of the projection matrix change rate in the row direction of all video frames in the infrared video during fast movement is determined as the video stability determination threshold value N stable , greater than the video stability judgment threshold N stable Indicates that the video frame is in an unsteady state, otherwise it is in a stable state.
[0048] Preferably, the implementation method of step S3 is as follows: the pre-processed infrared image containing the interference target is linearly stretched by percentage and then converted into an 8-bit unsigned integer image frame by frame, and a sample annotation tool is used to perform manual annotation to create a typical interference target data set;
[0049] The method of converting the real-time infrared image into an 8-bit image in step S6 is: converting the pre-processed real-time infrared image into an 8-bit image after linearly stretching the image by percentage;
[0050] The image segmentation model adopts yolov8 instance segmentation network;
[0051] The method for obtaining the suspected leakage data in step S7 is: merging the image after data enhancement and the frame difference result obtained by frame difference calculation to obtain the suspected leakage data.
[0052] Preferably, the implementation method of step S10 is as follows: assigning the pixel values of the interference area to the probability value of the interference area, filling the pixel values of other areas with 0, and making the area of interest Maskdis; assigning the pixel values of the VOCs leakage area to the probability value of the VOCs leakage area, filling the pixel values of other areas with 0, and making a mask Maskvocs; the probability mask New_Mask of the gas leakage area in the current frame image VOCs = Maskvocs-Maskdis; Update the VOCs leakage area and the probability value of the VOCs leakage area; assign values less than 0 to 0 and remove low-probability gas leakage areas;
[0053] The implementation method of the timing probability analysis of the leakage area in step S11 is: create a data queue, send the result obtained in step S10 into the queue, and when the number of data in the queue is equal to the length of the data queue, the timing detection algorithm starts to calculate and obtain the leakage mask area
[0054]
[0055] In the above formula, the leakage mask area Mean_VOCs represents the mean probability of the leakage area of the [j-10, j] video frame; Represents the probability mask of the leakage area of the,th frame in the queue;
[0056] The method for obtaining the leakage mask area in step S11 is: comparing the leakage mask area Mean_VOCs obtained in step S11 with the expected probability threshold, if it is greater than the expected value, updating the leakage probability value to 1, otherwise updating the leakage probability value to 0;
[0057] The superposition analysis in step S12 is to perform superposition and intersection analysis on the leakage mask area obtained in step S11 and the latest frame difference result.
[0058] Preferably, the method for calculating the leakage area is: according to the size, focal length and target distance D of the infrared detector of the infrared imager, the actual area of a single pixel is calculated.
[0059]
[0060] Among them, A pixel represents the actual coverage area of a single pixel, D represents the distance between the VOCs leakage area and the infrared gas imaging component, F represents the focal length, and A represents the distance between the VOCs leakage area and the infrared gas imaging component. detector Indicates the area of the infrared detector;
[0061] According to the leakage mask area Mean_VOCs and the actual area A of a single pixel pixel Calculate the gas leakage area:
[0062]
[0063] Among them, Mean_VOCs ij It represents the element value of the i-th row and j-th column of the leakage mask area Mean_VOCs, and m and n represent the number of rows and columns of the leakage mask area Mean_VOCs.
[0064] The number of pixels in the leakage area is obtained by counting the number of leakage mask areas where the Mean_VOCs value is 1.
[0065] A VOCs gas leakage detection device based on infrared gas imaging comprises an infrared gas imaging component, a laser ranging component, an image storage and processing module and an output display module. The infrared gas imaging component and the laser ranging component are both connected to the image storage and processing module, the image storage and processing module is connected to the output display module, and the image storage and processing module executes the VOCs gas leakage detection method based on infrared gas imaging.
[0066] Preferably, the infrared gas imaging component is used to collect thermal infrared images of the target area to find the suspected leakage area; the laser distance measuring component is used to measure the relative distance between the leakage area and the measurement point; the image storage and processing module is used to pre-process the infrared image collected by the infrared gas imaging component, classify and identify the suspected area according to the trained image classification model, obtain the VOCs leakage area, perform false color rendering on the VOCs leakage area, and calculate the VOCs leakage area according to the measured relative distance; the output display module is used to output and display the detection results;
[0067] The infrared gas imaging component is an infrared gas imager, which includes an optical system, an infrared detector, a refrigeration device and a front-end processing circuit. The optical system is arranged at the front end of the infrared detector, the infrared detector is arranged on the refrigeration device, the infrared detector is connected to the front-end processing circuit, and the front-end processing circuit is connected to the signal processing unit; the infrared detector and the refrigeration device are both connected to a temperature monitoring and control system, and the temperature monitoring and control system is respectively connected to the front-end processing circuit, the signal processing unit, and the image storage and processing module;
[0068] The optical system includes a variable-focus lens and a replaceable narrow-band filter, wherein the variable-focus lens is mounted on the front side of the infrared detector, and the replaceable narrow-band filter is arranged between the variable-focus lens and the infrared detector;
[0069] The laser ranging component is arranged on the upper side of the variable focus lens of the infrared imager component, and the laser ranging component and the infrared gas imaging component are deployed in the form of an array; the laser ranging component includes a laser transmitter and a laser receiver, and the laser transmitter and the laser receiver are matched.
[0070] Compared with the prior art, the beneficial effects of the present invention are as follows: the stability of the current device is determined by using a video stability determination algorithm, the video frames in a stable state are subjected to image stretching and enhancement, and the target segmentation technology in deep learning is used to identify interference areas and suspected leakage areas; then, the probability of leakage area is evaluated for a number of consecutive frames of images by using a time series analysis method; then, the leakage amount of the leakage area is estimated in combination with the target distance obtained by the laser ranging module, thereby realizing quantitative detection of the leakage area. Compared with traditional single-point laser measurement, the present invention can fully cover the leakage area, improve the comprehensiveness and practicality of detection; compared with traditional recognition algorithms, the present invention avoids the image segmentation process when extracting the foreground suspected area, and effectively reduces the risk of weak or small flow gas leakage detection. At the same time, by color rendering the leakage area, the leakage area is made more intuitive, which helps to quickly judge and take corresponding measures. Through this method, the present invention can realize rapid and accurate detection of VOCs gas leakage, and take timely measures to protect the environment and human health. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0072] Figure 1 It is a schematic structural diagram of the gas leakage detection device of the present invention.
[0073] Figure 2 The figure is a flow chart of the gas leakage detection method of the present invention.
[0074] Figure 3 This is an example of a detection box after being processed by the image segmentation model. DETAILED DESCRIPTION
[0075] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0076] Example 1
[0077] like Figure 1As shown, a VOCs gas leakage detection device based on infrared gas imaging includes an infrared gas imaging component, a laser ranging component, an image storage and processing module and an output display module. The infrared gas imaging component and the laser ranging component are both connected to the image storage and processing module, and the image storage and processing module is connected to the output display module. The infrared gas imaging component is used to collect thermal infrared images of the target area to find suspected leakage areas; the laser ranging component is used to measure the relative distance between the leakage area and the measurement point; the image storage and processing module is used to pre-process the infrared image collected by the infrared gas imaging component, classify and identify the suspected area according to the trained image classification model, obtain the VOCs leakage area, perform false color rendering on the leakage area, and calculate the area of the VOCs leakage area according to the measured relative distance; the output display module is used to output and display the detection results. The present invention combines infrared gas imagers, intelligent detection algorithms and laser ranging technology to achieve accurate positioning and quantitative detection of VOCs leakage points.
[0078] The infrared gas imaging component is an infrared gas imager, including a variable focus lens, an infrared detector, a refrigeration device, a replaceable narrow-band filter and a front-end processing circuit. The variable focus lens is installed on the front side of the infrared detector. The variable focus lens can adjust different focal lengths according to different distances to make the image clear. The infrared detector is used to collect infrared images of the target area. The infrared detector is set on the refrigeration device, which is a Stirling refrigerator. The refrigeration device cools the lens of the infrared detector. The Stirling refrigerator is mainly used in the refrigeration type infrared imaging system. Its main function is to provide a low temperature environment for the infrared detector installed on its cold head. The main purpose of doing so is to form a suitable low temperature constant temperature environment through refrigeration to ensure that the electronic devices or systems that need to work at low temperatures function normally, or to improve the sensitivity of the device. In addition, this process can also shield or reduce the thermal noise brought by the filters, baffles and optical systems of the thermal imaging system, thereby improving the performance and image quality of the infrared detector. The infrared detector can perform best when working at low temperatures, because it is essentially a photon detector and needs to be at low temperatures to achieve high sensitivity detection. The infrared detector is cooled to a low temperature state by a Stirling refrigerator, which can significantly improve its performance, allowing the infrared gas imaging component to better observe the heat source, improve sensitivity, and avoid image distortion. The replaceable narrowband filter is generally set between the zoom lens and the infrared detector. It is a special filter designed to allow light signals to pass through in a specific band and block light signals that deviate from this band. The zoom lens and the replaceable narrowband filter form an optical system for focusing infrared radiation signals to the infrared detector. The front-end processing circuit of the infrared detector movement is generally connected to the infrared detector array (or sensor element), and its function is to amplify the signal collected by the infrared detector, perform analog-to-digital conversion, noise filtering, non-uniformity correction, etc. The front-end processing circuit is connected to the signal processing unit. The infrared detector and the refrigeration equipment are both connected to the temperature monitoring and control system, which are respectively connected to the front-end processing circuit, the signal processing unit, the image storage and processing module, and the power management module. The temperature monitoring and control system monitors the temperature of the refrigeration equipment and the infrared detector to ensure that the infrared detector is within the optimal operating temperature range, and the power management module manages the voltage and current of the infrared imager component.
[0079] The laser distance measuring component includes a laser transmitter and a laser receiver. The laser transmitter and the laser receiver match each other, emit a measuring laser and receive the laser diffusely reflected by the object, and measure the distance between the target object and the infrared gas imaging component. Both the laser distance measuring component and the infrared gas imaging component are connected to the image storage and processing module, which can be understood as an edge computing device. Before the installation of the entire system, the laser component distance measuring component and the infrared gas imaging component will be aligned to ensure that the laser indication point of the laser distance measuring device can fall on the center of the field of view of the infrared imaging component. When a gas leak is detected, the laser distance measuring component is adjusted to align with the gas leak area for distance measurement. The laser distance measuring component is set on the upper side of the variable focus lens of the infrared imaging component. The two are deployed in the form of an array. The purpose is to reduce the relative distance between the two main optical axes, facilitate subsequent alignment, and improve the alignment accuracy and distance measurement accuracy.
[0080] The image storage and processing module mainly processes the original data, i.e., the infrared image collected by the infrared detector, and executes algorithms such as image digital detail enhancement, frame difference result enhancement, and VOCs leakage area identification, and outputs the results to be displayed according to the VOCS gas identification results. Image digital detail enhancement uses a histogram-based infrared image enhancement algorithm, which can process the wide dynamic image into a standard 8-bit image; the frame difference result enhancement algorithm is the subsequent frame difference result processing algorithm of the present invention; and leakage area identification is the subsequent detection method of the present invention.
[0081] The output display module can visualize the gas detection image, laser ranging data, and gas leakage results. The output display module can be a liquid crystal display. Each module is divided according to function, and can be split and combined according to the hardware situation. If necessary, it can be upgraded and replaced according to the application scenario. For example, the output display module can be equipped with an eyepiece screen to facilitate use under strong light; the output display module can also be connected to an LED expansion screen, such as a large screen for monitoring, which is convenient for use in fixed application scenarios. The present invention combines infrared imaging with a laser ranging component. The laser ranging obtains the distance between the gas leakage area and the detection point, which is convenient for calculating gas leakage.
[0082] Example 2
[0083] A VOCs gas leakage detection method based on infrared gas imaging, based on the hardware functional module of embodiment 1, the technical route of the present invention is as follows Figure 2 As shown, the specific implementation method of the present invention is:
[0084] The working steps of this method are divided into two parts: preliminary data preparation and actual working methods. The former includes sample acquisition, model training, projection matrix change rate statistics, etc.; the latter includes suspected interference target and leakage area identification, suspected leakage area time series analysis, and target distance measurement to be detected, leakage area statistics, leakage area annotation and rendering, etc.
[0085] The implementation steps of the early data preparation method of the present invention are as follows:
[0086] S1: The infrared gas imaging component performs video data acquisition, collecting videos of typical VOCs gas leaks, typical interference (people, vehicles, trees, shrubs) and rapid movement of the infrared gas imaging component.
[0087] Step S1 specifically includes the following specific contents:
[0088] When collecting VOCs gas leakage samples and typical interference target samples, VOCs gases are selected from hydrocarbon volatile organic compounds, such as methane (CH4), ethylene (C2H4) and butane (C4H 10 ) etc.; typical interference targets include people, vehicles, trees, bushes, grass, etc.; the infrared gas imaging component fast-moving video collection objects are not limited, and the collection personnel use the infrared gas imaging component to collect while moving. The selected scenes include indoor scenes and outdoor scenes. Typical interference videos are used for typical interference sample annotation, collecting video data such as people, cars, bushes, etc., converting the video data into image data, and then annotating samples of people, cars, bushes, etc.; the infrared gas imaging component fast-moving video is used to analyze the projection change rate of adjacent frames in the moving state to obtain the video stability judgment threshold N stable . Figure 2 The original video frames are used to mark typical moving interference objects, and the moving candidate areas are used to mark the original video frames in the leakage area. The original frames refer to the video data processed by the image digital detail enhancement algorithm. The data is stored in the form of video during the data acquisition process. The video is converted into an uncompressed image in PNG format frame by frame before annotation. Typical interference objects specifically refer to target objects such as people, cars, and shrubs that have obvious external features in the original video frames and have the possibility of movement. For example, people and cars can move at any time, and the branches and leaves of shrubs sway in the wind. The moving candidate area is the frame difference result of adjacent video frames, which contains all the change results of the two frames of images, such as the change of strong moving targets of people, cars, and shrubs, and the change of leaking gas.
[0089] S2: Perform digital detail enhancement on infrared videos containing VOCs gas leakage to obtain frame difference results, and perform data enhancement and annotation on the frame difference results to obtain a VOCs gas leakage dataset.
[0090] Step S2 specifically includes the following specific contents:
[0091] The infrared image in the infrared video containing VOCs gas leakage, that is, the output result of the front-end circuit, is subjected to image digital detail enhancement, and the original infrared video data is processed by the front-end circuit.
[0092] S21: Based on the infrared image after the image digital detail enhancement, a frame difference method is used to obtain a frame difference result. The calculation method is shown in formula (1):
[0093] diff t =gray (x,y,t) -gray (x,y,t-1) ×k (1)
[0094] Among them, gray (x,y,t) and gray (x,y,t+1) Respectively represent the grayscale value at (x, y) after digital detail enhancement of the infrared video at time t and time t+1; diff t represents the frame difference result at time t; k represents the correction coefficient, which ranges from 0.5 to 1.5. The frame difference processing obtains all the change areas, including the results of the movement of interference targets such as people, bushes, and vehicles, and the results of the motion state during gas leakage.
[0095] S22: Perform data enhancement on the frame difference results, including percentage linear stretching and motion gradient calculation.
[0096] The frame difference result is further processed, such as percentage stretching and data normalization. The specific implementation process of percentage linear stretching is as follows:
[0097] Determine the percentage stretch coefficient per, sort the grayscale values of the frame difference results, determine the grayscale values corresponding to the minimum percentage stretch coefficient per and the maximum percentage stretch coefficient (1-per), and mark them as a value and b value respectively (the above whole process is actually to use the obtained percentiles to remove noise and enhance features of the image); next, use the minimum adjustment percentage 0.01 and the maximum adjustment percentage 0.5 to update the a value (Formula (2)) and b value (Formula (3)) to obtain new a' and b' values, and mark the b' values less than a' and greater than b' as the minimum noise and maximum noise. Then, use Formula (4) to stretch and remove noise from the preprocessed grayscale image.
[0098] a′=a-(ba)*0.01 (2)
[0099] b′=b+(ba)*0.5 (3)
[0100]
[0101] Among them, diff (x,y) 、new_gray (x,y) They represent the frame difference result at (x, y) and the pixel value of the grayscale image after percentage stretching respectively.
[0102] The directional gradient information is the gradient direction angle, and the gradient direction angle extraction process is as follows:
[0103]
[0104] In the above formula, G x and G y Respectively represent the horizontal and vertical gradient sizes, new_gray is the grayscale image after percentage linear stretching, K x and K y They are the convolution kernels in the horizontal direction x and the vertical direction y respectively. The convolution kernel in the horizontal direction is Vertical convolution kernel θ represents the gradient direction matrix, and its value range is -π~+π. In order to facilitate subsequent processing, the gradient direction matrix θ is converted into a standard 8-bit unsigned integer image data to obtain a standardized motion gradient image:
[0105]
[0106] S23: Merge the frame difference result obtained in step S21 and the standardized motion gradient image obtained in step S22, annotate each frame data, and create a VOCs leakage data set.
[0107] Image merging is the frame difference result of linearly stretching the percentage new_gray (x,y) and the normalized motion gradient image θ scaled Perform band superposition; use annotation tools to annotate samples and mark gas leakage areas. Figure 2 The changed areas in the frame difference result are all the areas with pixel changes, and manual classification is to manually visually analyze the gas leakage area.
[0108] S3: Enhance the digital details of infrared data containing interference targets, obtain frame images of typical mobile interference such as people, vehicles, trees, shrubs, etc., annotate samples, and obtain a typical interference target data set.
[0109] Step S3 specifically includes the following specific contents:
[0110] S31: Convert the original video frames into 8-bit unsigned image data frame by frame by linear stretching according to equations (2), (3), and (4); the grayscale image after linear stretching may be of floating point type, and conversion into 8-bit unsigned integer image data is convenient for visual analysis of manual annotation.
[0111] S32: Manually annotate the 8-bit unsigned integer image obtained in step S31 to create a typical interference target data set including typical interferences such as people, vehicles, trees, and shrubs.
[0112] S4: Performing digital detail enhancement on the infrared video when the device is moving rapidly, counting the projection change rate of the video frame when the device is moving rapidly frame by frame, and obtaining a threshold for determining whether the device is in a stable state.
[0113] Step S4 specifically includes the following specific contents:
[0114] The original infrared image is digitally enhanced in detail, that is, the original data output by the front-end circuit is digitally enhanced in detail and converted into a standard 8-bit image.
[0115] S41: The specific calculation method of the statistical method of projection change rate is as follows:
[0116] Assume that the row-wise grayscale projection matrix of the kth frame of the video after the image digital detail enhancement is Row k , the row direction grayscale projection of the previous frame is Row k-1 ; The standard deviation matrix of the grayscale projection in the row direction of the kth frame of the video is S row,k , the standard deviation matrix of the grayscale projection in the row direction of the previous frame is S row,k-1 , then:
[0117]
[0118]
[0119] In the above formula, w represents the number of columns of the video frame; gray k (x, y) and gray k (x, y) represents the grayscale information of the two-dimensional image after digital detail enhancement of the kth and k-1th video frames respectively; Row k (x) and Row k-1 (x) represents the grayscale projection value of the xth row of the kth and k-1th video frames respectively.
[0120] Furthermore, based on the above calculation results, the projection matrix change rate C in the row direction is calculated using formula (12):
[0121]
[0122] S42: According to the method provided in step S41, the projection change rate C of the captured fast-moving video frames is counted frame by frame to determine the video stability determination threshold N. stable If the value is greater than the threshold, it means the video frame is in an unstable state, otherwise it is in a stable state. Video stability judgment threshold N stable It is the mean of the rate of change of the row-direction projection of all video frames in a video where the device is moving rapidly.
[0123] S5: The image segmentation model is trained using the VOCs leakage dataset and the typical interference target dataset to obtain the VOCs leakage detection model and the interference target detection model respectively.
[0124] Step S5 specifically includes the following specific contents:
[0125] S51: Perform model training based on the image segmentation model using the VOCs leakage data set obtained in step S2 to obtain a VOCs leakage detection model;
[0126] S52: Perform model training based on the image segmentation model using the typical interference target data set obtained in step S3 to obtain an interference target detection model.
[0127] The image segmentation model uses the yolov8 instance segmentation network.
[0128] The steps of the method in actual work are as follows:
[0129] S6: The infrared gas imaging component is turned on, and the real-time infrared image in the actual measurement environment is collected. The projection change rate of the real-time infrared image is calculated, and the current image projection change rate is compared with the video stability judgment threshold N obtained in step S4. stable Compare, if the current projection change rate is less than the video stability judgment threshold N stable , the real-time infrared image enters the subsequent processing process; otherwise, the real-time infrared image is converted into 8-bit format and sent to the output display module.
[0130] Step S6 specifically includes the following specific contents:
[0131] S61: Turn on the infrared gas imaging component, collect real-time infrared images under the actual measurement environment, pre-process the real-time infrared images, i.e., enhance the digital details of the images, and send them to the image storage and processing module. Calculate the projection change rate of the video frame according to the method provided in step S41, and compare it with the video stability determination threshold N obtained in step S4. stable If the value is less than the threshold, the real-time infrared image enters the subsequent processing process; otherwise, the real-time infrared image is linearly stretched according to formulas (2), (3), and (4) and converted into an 8-bit image, which is sent to the output display module to obtain Figure 2 The original frame. When the device is in motion, such as when a person is holding an infrared gas imaging component and moving, no image detection is performed to reduce algorithm overhead. The original frame is an 8-bit image after image preprocessing. Because the original infrared image data is 16-bit data, it cannot be displayed normally without image enhancement processing.
[0132] S7: Calculate the frame difference of the video frames that meet the requirements obtained in step S6, and perform percentage linear stretching, motion gradient calculation and data standardization to obtain suspected leakage data.
[0133] Step S7 specifically includes the following specific contents:
[0134] S71 processes the video frames that meet the requirements obtained in step S61 according to the methods described in steps S21 and S22, and merges the obtained image data to obtain suspected leakage data.
[0135] The result obtained in step S7 is the result of all frame differences. There are gas movement areas and other object movement areas such as people, so it is called suspected leakage area here. Suspected leakage area is the data before being sent to the image segmentation model for recognition. Before the image segmentation model is inferred, it is unclear which areas are gas leakage areas. After the image segmentation model is inferred, the probability value of each suspected area will be obtained, such as Figure 3 As shown in the figure, the detection result of the frame is recorded and can be made into a MASK containing probability values later.
[0136] S8: Input the preprocessed real-time infrared image obtained in step S6 into the interference target detection model trained in step S5 to identify the interference target and obtain the interference area and its probability value.
[0137] Step S8 specifically includes the following specific contents:
[0138] S81: Convert the video frame that meets the requirements obtained in step S6 into 8-bit data through image digital detail enhancement, and use the interference target detection model obtained in step S52 to identify it, and obtain the interference area and its probability value.
[0139] S82: Create an area of interest Maskdis: assign the pixel value of the interference area to the probability value of the interference area, and fill the pixel values of other areas with 0. This is convenient for time series analysis and eliminates accidental errors.
[0140] S9: Using the VOCs leakage detection model trained in step S5 to identify the VOCs leakage area of the suspected leakage data obtained in step S7, and obtain the VOCs leakage area and its probability value.
[0141] Step S9 specifically includes the following specific contents:
[0142] S91: Use the VOCs leakage detection model trained in step S51 to identify the suspected leakage data obtained in step S7, and obtain the VOCs leakage area and its probability value.
[0143] S92: Create a mask Maskvocs, assign the pixel value of the VOCs leakage area to the probability value of the VOCs leakage area, and fill the pixel values of other areas with 0.
[0144] S10: Perform difference processing on the probability values of the interference area and the leakage area obtained in steps S8 and S9, and update the VOC leakage area and its probability value.
[0145] Step S10 specifically includes the following specific contents:
[0146] S101: Subtract the interference area and leakage area data obtained in steps S28 and S29 according to formula (12), update the VOCs leakage area and its probability value, assign 0 to values less than 0 during the calculation process, and remove low-probability gas leakage areas. For example, the probability of gas leakage at the same location is 0.5, and the probability of a person (a person is an interference target) is 0.8. After subtraction, the probability is -0.3.
[0147] New_Mask VOCs =Maskvocs-Maskdis (13)
[0148] Among them, New_Mask VOCs The probability mask representing the gas leakage area in the current frame image.
[0149] The probability value of the interference area is updated by subtracting the probability value of the leakage area, thereby reducing the influence of the interference target on the leakage area identification and improving the accuracy of gas leakage area identification.
[0150] S11: Send the result obtained in step S10 to the data queue for time series probability analysis of the leakage area, and obtain the leakage mask area according to the set threshold.
[0151] Step S11 specifically includes the following specific contents:
[0152] S111: Create a data queue Q. The queue length is set as needed. In this method, the queue length is 10. Send the result obtained in step S101 to the queue. When the number of data in the queue is equal to 10, the timing detection algorithm starts to calculate. The specific detection method is shown in formula (14).
[0153]
[0154] In the above formula, the leakage mask area Mean_VOCs represents the mean probability of the leakage area of the [j-10, j] video frame. It represents the probability mask of the frame leakage area in the queue. The data queue facilitates the update and maintenance of data, ensuring that the data in the queue is always 10 frames and the latest data.
[0155] Specifically, the detection results of a single frame can also be used, but because gas is an irregular and continuously moving object, adding time series analysis can increase the stability of the entire algorithm and the reliability of the results. For example, if the results of 10 consecutive frames of images are all identified as gas leaks at a certain location, then this location is definitely a gas leak.
[0156] S12: Superimpose and analyze the leakage mask area obtained in step S11 and the latest frame difference result obtained in step S7 to obtain the leakage area; at the same time, call the laser ranging module to obtain the target distance.
[0157] Step S12 specifically includes the following specific contents:
[0158] S121: Compare the Mean VOCs of the leakage mask area obtained in step S11 with the expected probability threshold, and if it is greater than the expected value, update the probability value to 1, otherwise update the probability value to 0. The expected probability threshold is selected by the user, for example, it can be set to 0.5, which means that the areas with Mean VOCs greater than 0.5 in the leakage mask area are all gas leakage areas, and their values are set to 1, otherwise they are set to 0. The operation here is equivalent to a binary classification of the probability value.
[0159] S122: Superimpose and intersect the result obtained in step S121 with the latest frame difference result obtained in step S71 to obtain the leakage area; at the same time, call the laser ranging component to obtain the target distance D.
[0160] In step S121, a binarization result has been obtained, and the leakage area can be obtained by finding the intersection of the binarization result and the latest frame difference result (or it can be understood as using a binarization mask image to perform image cropping on the latest frame difference result).
[0161] S13: Calculate the leakage area according to the number of pixels in the leakage area and the target distance D obtained in step S12, and perform color rendering according to the range distribution of pixel values in the leakage area, and finally send the detection result to the output display module;
[0162] Step S13 specifically includes the following specific contents:
[0163] S131: Calculate the actual area A of a single pixel according to equation (15) based on the detector size, focal length and target distance D measured in step S122 of the infrared detector of the infrared imager. pixel .
[0164]
[0165] Among them, A pixel represents the actual coverage area of a single pixel, D represents the distance between the gas leakage area and the infrared gas imaging component, F represents the focal length, and A ... focal length.detector Indicates the area of the infrared detector size. The number of pixels in the leakage area is the number of pixels with Mean_VOCs value of 1 in the statistical leakage mask area.
[0166] S132: Based on the gas leakage area data obtained in step S111 --- leakage mask area Mean_VOCs and the single pixel area A obtained in step S131 pixel Calculate the gas leakage area A VOCs for:
[0167]
[0168] Among them, Mean_VOCs ij It represents the element value of the i-th row and j-th column of the leakage mask area Mean_VOCs, and m and n represent the number of rows and columns of the leakage mask area Mean_VOCs.
[0169] S133: The video frame that meets the requirements obtained in step S61 is stretched according to equations (2), (3), and (4) and converted into 8-bit data; then the leakage area obtained in step S122 is used to crop the latest frame difference result or perform mask intersection to obtain the grayscale change of the leakage area, and color rendering is performed according to the grayscale change to enhance the display effect of the leakage area.
[0170] Image Mask Intersection is a commonly used technique in image processing and computer vision to find the overlapping area of two or more masks. The mask is usually a binary image, where the foreground area (usually the area of interest) is marked as 1 or other non-zero values, and the background area is marked as 0. The data after the intersection is the complete leakage area, and its numerical value expresses the quantitative value of the gas absorption between frames.
[0171] S134: The leakage area obtained in step S132 and the rendering result obtained in step S133 are sent to the output display module for display, and the pseudo-color image of the leakage area and the real-time leakage area are synchronously displayed on the display screen.
[0172] The present invention proposes a VOCs gas leak detection device, method and system based on target detection, which can visualize leaked gas that is invisible to the human eye and measure the leakage area of the leaked gas. For the single infrared image detection algorithm that is susceptible to interference from moving targets, a recognition method combining raw infrared data and frame difference data is proposed. The method uses raw infrared data to identify typical interference (people, vehicles, trees, shrubs, etc.), and uses the enhanced frame difference results to identify suspected leakage areas; then the two recognition results are subtracted and analyzed, which improves the sensitivity of gas detection and reduces the influence of typical interference targets. Compared with the method of first extracting the motion area, performing threshold segmentation on the motion area, then performing connected domain or morphological operations, and then identifying the leakage area, the present invention avoids the problem of missed detection caused by the difficulty of fixing the threshold or the poor reliability of the adaptive threshold, reduces the algorithm complexity, and improves the algorithm execution efficiency. In addition, the present invention adds video stability judgment, which further increases the stability and reliability of the algorithm; in terms of gas quantitative analysis and leakage area display, the present invention also combines the laser ranging module to estimate the leakage amount and color rendering of the leakage area frame by frame, solving the problem of poor visualization and non-quantitativeness of VOCs in traditional infrared gas imaging measurement.
[0173] In view of the current research status and difficulties of VOCs leakage detection by infrared gas imaging equipment, the main advantages of the invention are:
[0174] Technical aspects:
[0175] 1. The interference target and leakage area analysis is performed based on single infrared data, which increases the stability and reliability of the algorithm and avoids the problem of poor algorithm stability caused by inconsistent detector response, excessive noise difference and spatial position mismatch in the method of using multiple sensors to eliminate interference.
[0176] 2. Combining the video stability judgment algorithm with the frame difference enhancement algorithm effectively improves the motion characteristics of the gas leakage area;
[0177] 3. The instance segmentation algorithm of the yolov8 network is used to simultaneously identify typical interference targets and suspected gas leakage areas, which improves the stability and accuracy of the model;
[0178] 4. Based on the leakage area and laser ranging results, quantitative and real-time statistics of the leakage area can be achieved.
[0179] Social level:
[0180] 1. Visual information: Image-based methods can provide operators with intuitive visual information, helping users to more easily identify the location and scope of gas leaks.
[0181] 2. No direct contact required: Image-level detection does not require direct contact with the gas, which may be more convenient in some cases. It also helps reduce the occurrence of accidents and emergencies, thereby improving industrial safety and protecting workers and production equipment.
[0182] 3. Emergency Response: In emergency situations, such as fires or chemical leaks, pixel-level gas detection methods can help emergency responders identify danger zones more quickly and take necessary actions to save lives.
[0183] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A VOCs gas leakage detection method based on infrared gas imaging, characterized in that: The steps are as follows: S1: Use infrared gas imaging components to collect infrared videos of typical VOCs gas leaks, typical interferences, and rapid movement of infrared gas imaging components; S2: Preprocess the infrared video containing VOCs gas leakage, obtain the frame difference result according to the preprocessed video, and perform data enhancement and annotation processing on the frame difference result to obtain the VOCs gas leakage data set; S3: Preprocess the infrared video containing the interference target, obtain the frame image of typical interference, annotate the sample of the frame image of typical interference, and obtain the typical interference target data set; S4: preprocessing the infrared video when the infrared gas imaging component moves rapidly, counting the projection change rate of the video frame when the infrared gas imaging component moves rapidly frame by frame, and obtaining a video stability determination threshold for determining whether the infrared gas imaging component is in a stable state; S5: Use the VOCs leakage dataset and the typical interference target dataset to train the image segmentation model respectively, and obtain the VOCs leakage detection model and the interference target detection model respectively; S6: using the infrared gas imaging component to collect real-time infrared video in the actual measurement environment and perform preprocessing, calculating the projection change rate of the preprocessed real-time infrared image, comparing the current image projection change rate with the video stability determination threshold obtained in step S4, if the current projection change rate is less than the video stability determination threshold, proceeding to step S7; otherwise, converting the real-time infrared image into an 8-bit image and storing it; S7: After performing frame difference calculation and data enhancement on the pre-processed real-time infrared video frame, suspected leakage data is obtained; S8: Input the preprocessed real-time infrared video frame into the interference target detection model to identify the interference target, and obtain the interference area and the probability value of the interference area; S9: inputting the suspected leakage data obtained in step S7 into the VOCs leakage detection model to identify the VOCs leakage area, and obtaining the VOCs leakage area and the VOCs leakage area probability value; S10: performing difference processing on the interference area probability value and the leakage area probability value, and updating the VOCs leakage area probability value; S11: sending the VOCs leakage area obtained in step S10 into the data queue for leakage area time series probability analysis, and obtaining the leakage mask area according to the set threshold; S12: superimpose and analyze the leakage mask area obtained in step S11 and the latest frame difference result obtained in step S7 to obtain the leakage area; the laser ranging module obtains the target distance; S13: Calculate the leakage area according to the number of pixels in the leakage area and the target distance obtained in step S12.
2. The VOCs gas leakage detection method based on infrared gas imaging according to claim 1 is characterized in that: The VOCs gas is selected from hydrocarbon volatile organic compounds, and the typical interference targets are selected from people, vehicles, trees, shrubs, and grass; the scenes selected as the video acquisition objects when the infrared gas imaging component moves quickly include indoor scenes and outdoor scenes; The preprocessing in step S2, step S3 and step S6 is image digital detail enhancement, and the image digital detail enhancement uses a histogram-based infrared image enhancement algorithm to process the wide dynamic infrared image into a standard 8-bit image; The data enhancement method in step S2 and step S7 is: performing percentage linear stretching and motion gradient calculation on the frame difference result in sequence; The annotation processing is to perform sample annotation on each frame image data after merging the frame difference result and the motion gradient image after data enhancement to create a VOCs leakage data set.
3. The VOCs gas leakage detection method based on infrared gas imaging according to claim 2 is characterized in that: The method for obtaining the frame difference result according to the preprocessed video is: obtaining the frame difference result by using the frame difference method: diff t =gray (x,y,t) -gray (x,y,t-1) ×k; Among them, gray (x,y,t) and gray (x,y,t+1) Respectively represent the grayscale value at (x, y) of the infrared image preprocessed at time t and t+1 of the infrared video; diff t represents the frame difference result at time t; k represents the correction coefficient; The implementation method of the percentage linear stretching is: determine the percentage stretching coefficient per, sort the grayscale values of the frame difference results, determine the grayscale values corresponding to the minimum percentage stretching coefficient per and the maximum percentage stretching coefficient (1-per) and mark them as a value and b value respectively; use the minimum adjustment percentage 0.01 and the maximum adjustment percentage 0.5 to update the a value and the b value to obtain new a' value and b' value, mark the b' value less than the a' value and greater than the b' value as the minimum noise and the maximum noise; stretch the frame difference results and remove the noise.
4. The VOCs gas leakage detection method based on infrared gas imaging according to claim 3 is characterized in that: The method of updating the a value and the b value with the minimum adjustment percentage of 0.01 and the maximum adjustment percentage of 0.5 to obtain the new a' value and the b' value is: a′=a-(ba)*0.01 b′=b+(ba)*0.5 The method for stretching and removing noise from the frame difference result is: Among them, diff (x,y) 、new_gray (x,y) Respectively represent the frame difference result at (x, y) and the pixel value of the grayscale image after percentage stretching; The implementation method of the motion gradient calculation is: Extract the gradient direction matrix: Among them, the horizontal gradient is: The vertical gradient is The horizontal convolution kernel is Vertical convolution kernel new_gray is the grayscale image after percentage linear stretching; Convert the gradient direction matrix θ into standard 8-bit unsigned integer image data to obtain the standardized motion gradient image: The image merging is to perform band superposition of the frame difference result and the standardized motion gradient image after data enhancement.
5. The VOCs gas leakage detection method based on infrared gas imaging according to any one of claims 1 to 4, characterized in that: The method for counting the projection change rate of the video frame during fast movement frame by frame in step S4 is: according to the pre-processed infrared video k-th frame row direction grayscale projection matrix Row k , the row-wise grayscale projection matrix Row of the k-1th frame k-1 ; Grayscale projection standard deviation matrix S in the row direction of the kth frame row,k , the standard deviation matrix of the grayscale projection in the row direction of the k-1th frame is S row,k-1 , calculate the rate of change of the projection matrix in the row direction: The method for calculating the projection change rate of the preprocessed real-time infrared image in step S6 is the same as the method for calculating the projection matrix change rate in the row direction of the video frame in step S4; The method for obtaining the threshold value for determining whether the device is in a stable state is as follows: the projection matrix change rate C of the captured infrared video during fast movement is counted frame by frame, and the average value of the projection matrix change rate in the row direction of all video frames in the infrared video during fast movement is determined as the video stability determination threshold value N stable , greater than the video stability judgment threshold N stable Indicates that the video frame is in an unsteady state, otherwise it is in a stable state.
6. The VOCs gas leakage detection method based on infrared gas imaging according to claim 5 is characterized in that: The implementation method of step S3 is: after the preprocessed infrared image containing the interference target is linearly stretched by percentage, it is converted into an 8-bit unsigned integer image frame by frame, and a sample annotation tool is used to perform manual annotation to create a typical interference target data set; The method of converting the real-time infrared image into an 8-bit image in step S6 is: converting the pre-processed real-time infrared image into an 8-bit image after linearly stretching the image by percentage; The image segmentation model adopts yolov8 instance segmentation network; The method for obtaining the suspected leakage data in step S7 is: merging the image after data enhancement and the frame difference result obtained by frame difference calculation to obtain the suspected leakage data.
7. The VOCs gas leakage detection method based on infrared gas imaging according to claim 5 is characterized in that: The implementation method of step S10 is as follows: assigning the pixel values of the interference area to the probability value of the interference area, filling the pixel values of other areas with 0, and making the region of interest Maskdis; assigning the pixel values of the VOCs leakage area to the probability value of the VOCs leakage area, filling the pixel values of other areas with 0, and making a mask Maskvocs; the probability mask New_Mask of the gas leakage area in the current frame image VOCs = Maskvocs-Maskdis; Update the VOCs leakage area and the probability value of the VOCs leakage area; assign values less than 0 to 0 and remove low-probability gas leakage areas; The implementation method of the timing probability analysis of the leakage area in step S11 is: create a data queue, send the result obtained in step S10 into the queue, and when the number of data in the queue is equal to the length of the data queue, the timing detection algorithm starts to calculate and obtain the leakage mask area In the above formula, the leakage mask area Mean_VOCs represents the mean probability of the leakage area of the [j-10, j] video frame; Represents the probability mask of the leakage area of the,th frame in the queue; The method for obtaining the leakage mask area in step S11 is: comparing the leakage mask area Mean_VOCs obtained in step S11 with the expected probability threshold, if it is greater than the expected value, updating the leakage probability value to 1, otherwise updating the leakage probability value to 0; The superposition analysis in step S12 is to perform superposition and intersection analysis on the leakage mask area obtained in step S11 and the latest frame difference result; The number of pixels in the leakage area is obtained by counting the number of leakage mask areas where the Mean_VOCs value is 1.
8. The VOCs gas leakage detection method based on infrared gas imaging according to claim 7 is characterized in that: The method for calculating the leakage area is: according to the size, focal length and target distance D of the infrared detector of the infrared imager, the actual area of a single pixel is calculated. Among them, A pixel represents the actual coverage area of a single pixel, D represents the distance between the VOCs leakage area and the infrared gas imaging component, F represents the focal length, and A represents the distance between the VOCs leakage area and the infrared gas imaging component. detector Indicates the area of the infrared detector; According to the leakage mask area Mean_VOCs and the actual area A of a single pixel pixel Calculate the gas leakage area: Among them, Mean_VOCs ij It represents the element value of the i-th row and j-th column of the leakage mask area Mean_VOCs, and m and n represent the number of rows and columns of the leakage mask area Mean_VOCs.
9. A VOCs gas leakage detection device based on infrared gas imaging, comprising an infrared gas imaging component, a laser ranging component, an image storage and processing module and an output display module, wherein the infrared gas imaging component and the laser ranging component are both connected to the image storage and processing module, which is connected to the output display module, and the image storage and processing module executes the VOCs gas leakage detection method based on infrared gas imaging as described in claims 1-8.
10. The VOCs gas leakage detection device based on infrared gas imaging according to claim 9, characterized in that: The infrared gas imaging component is used to collect thermal infrared images of the target area to find suspected leakage areas; the laser distance measuring component is used to measure the relative distance between the leakage area and the measurement point; the image storage and processing module is used to pre-process the infrared image collected by the infrared gas imaging component, classify and identify the suspected area according to the trained image classification model, obtain the VOCs leakage area, perform false color rendering on the VOCs leakage area, and calculate the area of the VOCs leakage area according to the measured relative distance; the output display module is used to output and display the detection results; The infrared gas imaging component is an infrared gas imager, which includes an optical system, an infrared detector, a refrigeration device and a front-end processing circuit. The optical system is arranged at the front end of the infrared detector, the infrared detector is arranged on the refrigeration device, the infrared detector is connected to the front-end processing circuit, and the front-end processing circuit is connected to the signal processing unit; the infrared detector and the refrigeration device are both connected to a temperature monitoring and control system, and the temperature monitoring and control system is respectively connected to the front-end processing circuit, the signal processing unit, and the image storage and processing module; The optical system includes a variable-focus lens and a replaceable narrow-band filter, wherein the variable-focus lens is mounted on the front side of the infrared detector, and the replaceable narrow-band filter is arranged between the variable-focus lens and the infrared detector; The laser ranging component is arranged on the upper side of the variable focus lens of the infrared imager component, and the laser ranging component and the infrared gas imaging component are deployed in the form of an array; the laser ranging component includes a laser transmitter and a laser receiver, and the laser transmitter and the laser receiver are matched.
Citation Information
Patent Citations
VOCs leakage on-line detection system
CN112284628A
Gas infrared video enhancement method and device and storage medium
CN109727202A
VOCs gas leakage detection method and system based on optical gas imaging
CN112781791A
VOCs gas leakage detection method and device and storage medium
CN117333776A
Laser positioning and distance measuring method and system for VOCs infrared imaging gas leak detector
CN117554975A
Cited By
Gas leakage detection method, equipment, system and computer equipment
CN120740868A