A VOCs gas leak detection device and method based on infrared gas imaging
By combining infrared gas imager and laser ranging technology, using video stability judgment and deep learning target segmentation, the accuracy and sensitivity problems of infrared imaging gas detection in complex environments are solved, and the rapid and accurate detection and quantitative analysis of VOCs gas leakage is achieved.
Patent Information
- Application Number
- CN202411672193.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-11-21
AI Technical Summary
The existing infrared imaging gas detection technology is susceptible to interference in complex environments, with low detection accuracy and sensitivity, making it difficult to identify weak gas leakage, and cannot fully cover the leaked area. The traditional method is not effective when there is insufficient light.
Combined with infrared gas imager and laser ranging technology, VOCs gas leakage is identified and quantitatively detected through video stability determination, deep learning target segmentation and timing analysis, image enhancement and frame difference processing are used, and distance is obtained by combining laser ranging modules to achieve contactless quantitative detection.
It realizes rapid and accurate detection of VOCs gas leakage, can identify weak leakage in complex environments, reduce the risk of misidentification, and provide intuitive display of leakage areas, which is suitable for a variety of scenarios.
Smart Images

Figure CN119643054B_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 concentrations of VOCs in the air can cause serious harm to the environment and human health. Therefore, timely detection and monitoring of VOCs has become particularly important.
[0003] Traditional VOC gas detection methods primarily rely on chemical sensors or laser measurement. Chemical sensors require direct contact with the sample being measured, resulting in poor timeliness and safety. Laser measurement offers high accuracy and efficiency, but is limited to single-point detection and lacks comprehensive coverage of the leak area, hindering intuitive visualization of the leak location and direction. Infrared imaging technology, as a non-contact, long-range detection method, offers advantages such as non-contact and long-range monitoring, and is currently a hot topic in VOC gas leak detection research.
[0004] Infrared imaging technology detects and identifies targets by detecting their infrared radiation energy. Its adaptability and sensitivity make it a promising candidate for widespread application in gas detection. However, current infrared imaging gas detection technology still faces challenges in practical applications, particularly in low-concentration, low-flow gas leaks, where existing recognition methods suffer from significant false positives and omissions. To overcome these challenges and improve detection accuracy and efficiency, traditional infrared image processing methods need to be further optimized and refined to meet practical detection requirements.
[0005] Therefore, the following problems exist in gas leak 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 gas leaks in complex environments is weak, image algorithms such as interference removal are complex and computationally intensive, and real-time data processing is difficult to guarantee;
[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] Currently, there are some infrared image-based technologies for detecting and identifying leaking gas and analyzing the amount of leakage, but these methods mostly focus on identifying the leaking area using a motion target extraction algorithm. In terms of extracting the moving area, in order to separate the moving area, eliminate noise, and exclude other interference, the moving area is often binarized using a threshold segmentation method. The uncertainty of the threshold directly leads to the uncertainty of the subsequent extraction results, especially in the case of weak gas leaks, which is more likely to cause missed identification. In addition, in order to more effectively eliminate interfering targets, the method of jointly analyzing 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 spectral imaging between infrared and visible light to eliminate motion interference. However, 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] Patent application number 202011353349.5 discloses an online VOCs leak detection system for online detection of VOCs leaks in a detection area, where the detection area consists 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 configured to acquire image information of the detection area in real time. The image processing module is configured to process the image information and, based on the image information, determine the detection point where the VOCs leak has occurred. Each detection point is provided with at least one data acquisition device and at least one data sampling device. The online detection system is capable of efficiently, promptly, and accurately detecting VOCs leaks. However, the above invention requires actual detection of the composition and concentration of the detection points and requires a gas pretreatment device. The gas must first be cooled and dehumidified by the sampling device before further identification and detection can be performed. It only supports fixed online detection and does not support handheld mobile, portable fixed, or fixed online detection scenarios. Summary of the Invention
[0011] In response to the technical problems that existing gas leak detection methods are easily affected by environmental interference and have poor detection accuracy, the present invention proposes a VOCs gas leak detection device and method based on infrared gas imaging. This device combines an infrared gas imager, an intelligent detection algorithm, and 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 at the detection points. It does not require any pre-processing process and can be directly used for gas detection in different leakage scenarios, with a wider 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 interference, and when the infrared gas imaging components are moving rapidly;
[0014] S2: Preprocess the infrared video containing VOCs gas leakage, obtain the frame difference result based on the preprocessed video, and perform data enhancement and annotation on the frame difference result to obtain the VOCs gas leakage dataset;
[0015] S3: Preprocess the infrared video containing interference targets to obtain frame images of typical interference, perform sample annotation on the frame images of typical interference, and obtain a typical interference target dataset;
[0016] S4: Preprocessing the infrared video when the infrared gas imaging component is moving rapidly, counting the projection change rate of the video frame during the rapid movement 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 to 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, the projection change rate of the preprocessed real-time infrared image is calculated, and the current image projection change rate is compared with the video stability determination threshold obtained in step S4. If the current projection change rate is less than the video stability determination threshold, then proceed to step S7; otherwise, the real-time infrared image is converted to an 8-bit image and stored;
[0019] S7: After performing frame difference calculation and data enhancement on the pre-processed real-time infrared video frames, suspected leakage data is obtained;
[0020] S8: Input the pre-processed 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: Send the VOCs leakage area 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;
[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 for video capture 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 dataset.
[0029] Preferably, the method for obtaining the frame difference result based on the preprocessed video is: obtaining the frame difference result 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 preprocessing at time t and time 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 as follows: determining the percentage stretching coefficient per, sorting the grayscale values of the frame difference results, determining the grayscale values corresponding to the minimum percentage stretching coefficient per and the maximum percentage stretching coefficient (1-per) and marking them as a value and b value respectively; using 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, marking the b′ value less than the a′ value and greater than the b′ value as the minimum noise and the maximum noise; stretching and noise removal of the frame difference results.
[0033] Preferably, the minimum adjustment percentage of 0.01 and the maximum adjustment percentage of 0.5 are used to update the a value and the b value, and the method for obtaining the new a' value and the new 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) 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 linear stretching by percentage;
[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 on the frame difference result and the normalized 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 k-1th frame row direction grayscale projection matrix Rowk-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 pre-processed 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 rapid movement is counted frame by frame, and the average of the row-direction projection matrix change rates of all video frames in the infrared video during rapid 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 unstable state, otherwise it is in a stable state.
[0048] Preferably, the implementation method of step S3 is as follows: performing linear percentage stretching on the pre-processed infrared image containing the interference target and converting it into an 8-bit unsigned integer image frame by frame, manually annotating it using a sample annotation tool 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: performing percentage linear stretching on the pre-processed real-time infrared image and then converting it into an 8-bit image;
[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 VOCs leakage area probability value; assign values less than 0 to 0 and remove low-probability gas leakage areas;
[0053] The method for implementing the timing probability analysis of the leakage area in step S11 is as follows: 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 [j-10, j] video frame; The probability mask representing the leakage area of the,th frame in the queue;
[0056] The method for obtaining the leakage mask area in step S11 is as follows: comparing the leakage mask area Mean_VOCs obtained in step S11 with the expected probability threshold, and 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 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 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 pixels in the leakage mask area whose Mean_VOCs value is 1.
[0065] A VOCs gas leak 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, which is connected to the output display module. The image storage and processing module executes the VOCs gas leak 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 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 images collected by the infrared gas imaging component, classify and identify the suspected areas 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;
[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 are 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, a time series analysis method is used to evaluate the probability of leakage areas for several consecutive frames of images; then, the leakage amount of the leakage area is estimated in combination with the target distance obtained by the laser ranging module, thereby achieving quantitative detection of the leakage area. Compared with traditional single-point laser measurement, the present invention can fully cover the leakage area, improving 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, effectively reducing 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 achieve rapid and accurate detection of VOCs gas leaks, 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 following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.
[0072] Figure 1 Schematic diagram of the structure of the gas leakage detection device of the present invention.
[0073] Figure 2 Flowchart of the gas leakage detection method of the present invention.
[0074] Figure 3 This is an example image of the detection box after being processed by the image segmentation model. DETAILED DESCRIPTION
[0075] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0076] Example 1
[0077] like Figure 1As shown, a VOCs gas leak 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, which is then connected to the output display module. The infrared gas imaging component is used to collect thermal infrared images of the target area to detect 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 images collected by the infrared gas imaging component, classify and identify suspected areas based on a trained image classification model, obtain VOCs leakage areas, perform false color rendering on the leakage areas, and calculate the area of the VOCs leakage area based on the measured relative distance; the output display module is used to output and display the detection results. The present invention combines an infrared gas imager, an intelligent detection algorithm, and laser ranging technology to achieve accurate positioning and quantitative detection of VOCs leakage points.
[0078] The infrared gas imaging assembly is an infrared gas imager, consisting of a variable-focus lens, an infrared detector, a cooling unit, replaceable narrowband filters, and front-end processing circuitry. The variable-focus lens is mounted on the front of the infrared detector and can adjust its focal length to different distances, ensuring clear imaging. The infrared detector, used to capture infrared images of the target area, is mounted on a cooling unit, typically a Stirling refrigerator. This refrigerator cools the infrared detector's lens. Stirling refrigerators are primarily used in cooled infrared imaging systems, providing a low-temperature environment for the infrared detector mounted on its cold head. This creates a suitable, constant-temperature environment to ensure proper function of electronic components or systems requiring low-temperature operation or to enhance their sensitivity. This process also shields or reduces thermal noise from the thermal imaging system's filters, baffles, and optical system, thereby improving the performance and image quality of the infrared detector. Infrared detectors perform best at low temperatures, as they are essentially photon detectors requiring low temperatures for high sensitivity. The infrared detector is cooled to a cryogenic temperature by a Stirling cooler, significantly improving its performance. This allows the infrared gas imaging component to better observe heat sources, increase sensitivity, and avoid image distortion. A replaceable narrowband filter, typically placed between the zoom lens and the infrared detector, is a special filter designed to allow light signals within a specific wavelength band to pass while blocking light signals outside this band. The zoom lens and replaceable narrowband filter form an optical system that focuses the infrared radiation signal onto the infrared detector. The infrared detector's front-end processing circuitry is typically connected to the infrared detector array (or sensor element). Its function is to amplify, perform analog-to-digital conversion, perform noise filtering, and perform non-uniformity correction on the signals collected by the infrared detector. The front-end processing circuitry is connected to the signal processing unit. The infrared detector and cooling unit are both connected to a temperature monitoring and control system, which is connected to the front-end processing circuitry, signal processing unit, image storage and processing module, and power management module, respectively. The temperature monitoring and control system monitors the temperature of the cooling unit and infrared detector to ensure the infrared detector remains within the optimal operating temperature range. The power management module manages the voltage and current of the infrared imager components.
[0079] The laser ranging assembly consists of a laser transmitter and a laser receiver. The laser transmitter and laser receiver are matched to each other, emitting a measuring laser and receiving the laser diffusely reflected back from an object, thereby measuring the distance of the target object from the infrared gas imaging assembly. Both the laser ranging assembly and the infrared gas imaging assembly are connected to the image storage and processing module, which can be understood as an edge computing device. Before the entire system is installed, the laser ranging assembly and the infrared gas imaging assembly are aligned to ensure that the laser pointer of the laser rangefinder falls within the center of the infrared imaging assembly's field of view. When a gas leak is detected, the laser ranging assembly is adjusted to align with the gas leak area for distance measurement. The laser ranging assembly is located above the infrared imaging assembly's variable focus lens. The two are deployed in an array to reduce the relative distance between the two main optical axes, facilitate subsequent alignment, and improve alignment accuracy and distance measurement accuracy.
[0080] The image storage and processing module primarily processes the raw data, namely the infrared images captured by the infrared detector, executing algorithms such as image digital detail enhancement, frame difference enhancement, and VOCs leakage area identification. It also outputs the results for display based on the VOCs gas identification results. Image digital detail enhancement utilizes a histogram-based infrared image enhancement algorithm, converting wide dynamic range images into standard 8-bit images. The frame difference enhancement algorithm is a subsequent frame difference processing algorithm of the present invention. Leakage area identification is a subsequent detection method of the present invention.
[0081] The output display module can visualize gas detection images, laser ranging data, and gas leakage results. The output display module can be a liquid crystal display. Each module is divided by function and can be split and combined according to hardware conditions. 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, for use in fixed application scenarios. The present invention combines infrared imaging with laser ranging components. Laser ranging obtains the distance between the gas leakage area and the detection point, facilitating the calculation of 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, and projection matrix change rate statistics; 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 the infrared gas imaging component moving rapidly.
[0087] Step S1 specifically includes the following 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, shrubs, and grass; the infrared gas imaging component's fast-moving video capture is not limited to any object, and the capture personnel use the infrared gas imaging component to capture while moving. The selected scenes include indoor and outdoor scenes. Typical interference videos are used to annotate typical interference samples, collecting video data such as people, cars, and shrubs. After converting the video data into image data, sample annotations are performed on targets such as people, cars, and shrubs; the infrared gas imaging component's fast-moving video is used to analyze the projection change rate of adjacent frames in a moving state to obtain the video stability determination threshold N. stable . Figure 2 The original video frames are used to annotate typical moving interference objects, and the motion candidate regions are used to mark the original video frames in the leakage area. The original frames refer to video data processed by the image digital detail enhancement algorithm. During the data acquisition process, the video is stored as a video. Before annotation, the video is converted frame by frame into uncompressed PNG images. Typical interference objects specifically refer to objects such as people, cars, and shrubs that have obvious external features in the original video frames and are likely to move. For example, people and cars can move at any time, and shrub branches and leaves sway in the wind. The motion candidate regions are the frame difference results of adjacent video frames, which include all changes between the two frames, such as changes in strong moving objects such as people, cars, and shrubs, and changes in 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 digital detail enhancement, the frame difference method is used to obtain the 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 The frame difference result at time t is represented by k, which is a correction factor ranging from 0.5 to 1.5. Frame difference processing captures all changes, including the movement of interfering objects such as people, shrubs, and vehicles, as well as the motion state of gas leaks.
[0095] S22: Perform data enhancement on the frame difference results, including percentage linear stretching and motion gradient calculation.
[0096] The frame difference results are 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 (Equation (2)) and b value (Equation (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 Equation (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. The gradient direction angle extraction process is as follows:
[0103]
[0104] In the above formula, G x and G y Represents the horizontal and vertical gradient sizes respectively, 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 vertical direction y respectively. The horizontal convolution kernel is Vertical convolution kernel θ represents the gradient direction matrix, and its value range is -π to +π. In order to facilitate subsequent processing, the gradient direction matrix θ is converted into a standard 8-bit unsigned integer image data to obtain the standardized motion gradient image:
[0105]
[0106] S23: Merge the frame difference result obtained in step S21 and the normalized motion gradient image obtained in step S22, annotate each frame data, and create a VOCs leakage dataset.
[0107] Image merging is the linear stretching of the percentage frame difference result new_gray (x,y) and the normalized motion gradient image θ scaled Perform band overlay; use annotation tools to mark samples and mark gas leakage areas. Figure 2 The changed areas in the frame difference result are all 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 moving 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 contents:
[0110] S31: Convert the original video frames into 8-bit unsigned image data frame by frame according to the percentage linear stretching of formulas (2), (3), and (4); the grayscale image after percentage linear stretching may be floating point type, and conversion to 8-bit unsigned integer image data is convenient for visual analysis of manual annotation.
[0111] S32: Manually label 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, and obtaining a threshold for determining whether the device is in a stable state.
[0113] Step S4 specifically includes the following 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 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 k-th and k-1-th 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 , 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 row-direction projection change rates of all video frames in a video with fast device movement.
[0123] S5: Use the VOCs leakage dataset and the typical interference target dataset to train the image segmentation model respectively to obtain the VOCs leakage detection model and the interference target detection model respectively.
[0124] Step S5 specifically includes the following contents:
[0125] S51: Perform model training based on the image segmentation model using the VOCs leakage dataset 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 actual working method of this method are as follows:
[0129] S6: The infrared gas imaging component is turned on to collect real-time infrared images in the actual measurement environment, calculate the projection change rate of the real-time infrared image, and compare the current image projection change rate with the video stability judgment threshold N obtained in step S4. stable Comparison, 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 contents:
[0131] S61: Turn on the infrared gas imaging component to collect real-time infrared images in 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 real-time infrared image is smaller than the threshold, it will enter the subsequent processing process; otherwise, the real-time infrared image will be linearly stretched according to formulas (2), (3), and (4) and converted into an 8-bit image, which will be 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, image detection is not 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, it cannot be displayed properly without image enhancement.
[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 normalization to obtain suspected leakage data.
[0133] Step S7 specifically includes the following 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 they are called suspected leakage areas here. Suspected leakage areas are 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 is obtained, such as Figure 3 The detection result of the frame is recorded and can be used to create a mask containing probability values later.
[0136] S8: Input the pre-processed 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 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 a region of interest Maskdis: assign pixel values in the interference area the probability value of the interference area, and fill pixel values in other areas with 0. This facilitates time series analysis and eliminates accidental errors.
[0140] S9: Using the VOCs leakage detection model trained in step S5, the suspected leakage data obtained in step S7 are used to identify the VOCs leakage area, and the VOCs leakage area and its probability value are obtained.
[0141] Step S9 specifically includes the following 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 values 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 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, which reduces the impact of the interference target on the leakage area identification and improves 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 contents:
[0152] S111: Create a data queue Q. The queue length is set as needed. In this method, the queue length is 10. The result obtained in step S101 is sent 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. Represents the probability mask of the frame leakage area in the queue. The data queue facilitates data update and maintenance, ensuring that the data in the queue is always 10 frames and the latest data.
[0155] Specifically, single-frame detection results can be used, but because gas is an irregular, 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 all identify a gas leak at a certain location, then that 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 contents:
[0158] S121: Compare the Mean VOCs of the leakage mask obtained in step S11 with the expected probability threshold. If the value is greater than the expected value, the probability value is updated to 1; otherwise, the probability value is updated to 0. The expected probability threshold is user-selectable. For example, it can be set to 0.5, which means that any area in the leakage mask with a Mean VOCs greater than 0.5 is a gas leak area and its value is set to 1; otherwise, it is set to 0. This operation is equivalent to performing a binary classification on 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 intersecting the binarization result with 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 based on the number of pixels in the leakage area and the target distance D obtained in step S12, perform color rendering based on the range distribution of pixel values in the leakage area, and finally send the detection results to the output display module;
[0162] Step S13 specifically includes the following contents:
[0163] S131: Calculate the actual area A of a single pixel according to formula (15) based on the detector size and focal length of the infrared detector of the infrared imager and the target distance D measured in step S122. 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 Adetector The area represents the size of the infrared detector. The number of pixels in the leakage area is the number of pixels in the leakage mask area where the Mean_VOCs value is 1.
[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 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 subjected to image stretching processing according to equations (2), (3), and (4) and converted into 8-bit data; then the latest frame difference result is cropped or masked using the leakage area obtained in step S122 to obtain the grayscale change of the leakage area, and its color is rendered according to the grayscale change to enhance the display effect of the leakage area.
[0170] Image mask intersection is a common technique in image processing and computer vision used to find the overlapping areas of two or more masks. A mask is typically a binary image, where the foreground (usually the region of interest) is labeled with 1 or other non-zero values, while the background is labeled with 0. The resulting intersection represents the complete leak area, with the numerical value representing the quantified amount of 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] This invention proposes a VOCs gas leak detection device, method, and system based on target detection. This method can visualize leaking gases invisible to the human eye and measure the leak area. To address the susceptibility of single infrared image detection algorithms to interference from moving targets, a recognition method combining raw infrared data and frame difference data is proposed. This method uses raw infrared data to identify typical interference targets (such as people, vehicles, trees, and shrubs) and uses enhanced frame difference data to identify suspected leak areas. The two recognition results are then subtracted, improving gas detection sensitivity and reducing the impact of typical interfering targets. Compared to methods that first extract moving regions, perform threshold segmentation on these regions, and then perform connected domain or morphological operations before leak area identification, this invention avoids the problems of missed detections caused by the difficulty of fixing thresholds or the poor reliability of adaptive thresholds, thereby reducing algorithm complexity and improving execution efficiency. Furthermore, this invention incorporates video stability detection, further enhancing algorithm stability and reliability. For gas quantitative analysis and leak area visualization, this invention also incorporates a laser ranging module to perform frame-by-frame leakage estimation and color rendering of the leak area, addressing the poor visualization and quantification issues of traditional infrared gas imaging VOCs measurement.
[0173] In view of the current research status and difficulties of VOCs leak detection using infrared gas imaging equipment, the main advantages of this invention are:
[0174] Technical level:
[0175] 1. Analyzing interference targets and leakage areas based on single infrared data increases the stability and reliability of the algorithm, avoiding the problems of poor algorithm stability caused by inconsistent detector responses, excessive noise differences, and spatial position mismatch in the method of using multiple sensors to eliminate interference.
[0176] 2. Combining the video stability determination 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 are 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 eliminates the need for direct contact with gases, which can be more convenient in some cases. This helps reduce 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, take necessary actions, and 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 principles of the present invention should be included in the scope of protection 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 interference, and when the infrared gas imaging components are moving rapidly; S2: Preprocess the infrared video containing VOCs gas leakage, obtain the frame difference result based on the preprocessed video, and perform data enhancement and annotation on the frame difference result to obtain the VOCs gas leakage dataset; S3: Preprocess the infrared video containing interference targets to obtain frame images of typical interference, perform sample annotation on the frame images of typical interference, and obtain a typical interference target dataset; S4: Preprocessing the infrared video when the infrared gas imaging component is moving rapidly, counting the projection change rate of the video frame during the rapid movement 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 to 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, the projection change rate of the preprocessed real-time infrared image is calculated, and the current image projection change rate is compared with the video stability determination threshold obtained in step S4. If the current projection change rate is less than the video stability determination threshold, then proceed to step S7; otherwise, the real-time infrared image is converted to an 8-bit image and stored; S7: After performing frame difference calculation and data enhancement on the pre-processed real-time infrared video frames, suspected leakage data is obtained; S8: Input the pre-processed 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 probability value of the interference area and the probability value of the VOCs leakage area, and updating the probability value of the VOCs leakage area; S11: Send the VOCs leakage area probability value obtained in step S10 to the data queue for leakage area time series probability analysis, and obtain 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 video capture objects selected 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 dataset.
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 based on the pre-processed video is: obtaining the frame difference result 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 preprocessing at time t and time 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 as follows: determining the percentage stretching coefficient per, sorting the grayscale values of the frame difference results, determining the grayscale values corresponding to the minimum percentage stretching coefficient per and the maximum percentage stretching coefficient (1-per) and marking them as a value and b value respectively; using 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, marking the b′ value less than the a′ value and greater than the b′ value as the minimum noise and the maximum noise; stretching and noise removal of the frame difference results.
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 as follows: 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) 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 linear stretching by percentage; 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 on the frame difference result and the normalized 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 as follows: according to the pre-processed infrared video k-th frame row direction grayscale projection matrix Row k , the k-1th frame row direction grayscale projection matrix Row k -1; the 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 pre-processed 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 rapid movement is counted frame by frame, and the average of the row-direction projection matrix change rates of all video frames in the infrared video during rapid 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 unstable state, otherwise it is in a stable state.
6. The VOCs gas leakage detection method based on infrared gas imaging according to claim 5, characterized in that: 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 manually annotated using a sample annotation tool 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: performing percentage linear stretching on the pre-processed real-time infrared image and then converting it into an 8-bit image; 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, characterized in that: The implementation method of step S10 is as follows: assigning 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 pixel values of the VOCs leakage area to the probability value of the VOCs leakage area, and 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 VOCs leakage area probability value; assign values less than 0 to 0 and remove low-probability gas leakage areas; The method for implementing the timing probability analysis of the leakage area in step S11 is as follows: 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 [j-10, j] video frame; The probability mask representing the leakage area of the j-th frame in the queue; The method for obtaining the leakage mask area in step S11 is as follows: comparing the leakage mask area Mean_VOCs obtained in step S11 with the expected probability threshold, and 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 pixels in the leakage mask area whose Mean_VOCs value is 1.
8. The VOCs gas leakage detection method based on infrared gas imaging according to claim 7, characterized in that: The method for calculating the leakage area is as follows: the actual area of a single pixel is calculated based on the size, focal length and target distance D of the infrared detector of the infrared imager. 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 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 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 leak 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 leak detection method based on infrared gas imaging as described in any one of claims 1 to 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 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 images collected by the infrared gas imaging component, classify and identify the suspected areas 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 based on 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 are 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
Laser positioning and distance measuring method and system for VOCs infrared imaging gas leak detector
CN117554975A