Gas leakage infrared detection algorithm for self-adaptive environmental noise suppression
By combining wavelet transform, inter-frame difference method and adaptive filter, the noise interference problem of infrared gas detection equipment in complex environments is solved, high-sensitivity and high-precision gas leak identification is achieved, and the stability and accuracy of detection are improved.
Patent Information
- Application Number
- CN202510880086.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional infrared gas detection equipment is easily affected by ambient temperature fluctuations, background radiation and atmospheric turbulence, resulting in a low detection signal-to-noise ratio and difficulty in distinguishing between real leaks and environmental noise. High-sensitivity detectors are prone to false alarms, while reducing sensitivity may miss tiny leaks.
Noise suppression is performed by combining wavelet transform with inter-frame difference method, dynamic noise baseline is predicted through LSTM model, threshold and filter coefficient are adjusted using adaptive filter, scene displacement is eliminated by combining optical flow method, multi-frame fusion and post-processing are performed to achieve highly sensitive environmental noise suppression.
While maintaining high sensitivity, it effectively eliminates environmental noise interference, improves detection stability and accuracy in complex scenarios, reduces false alarm rates, and achieves high-precision gas leak identification.
Smart Images

Figure CN120808007A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of infrared gas detection, and particularly relates to a gas leakage infrared detection algorithm with adaptive environmental noise suppression. BACKGROUND
[0002] The infrared gas detection equipment is an instrument for detecting gas concentration, leakage and the like by using infrared principle. The traditional infrared gas detection equipment is susceptible to environmental temperature fluctuation, background radiation (such as sunlight, equipment heat source) and atmospheric turbulence interference, resulting in low detection signal-to-noise ratio. In complex industrial scenes (such as oil refineries and chemical plants), the gas diffusion form is variable, and the traditional algorithm is difficult to distinguish real leakage from environmental noise in real time. A high-sensitivity detector is easy to capture noise signals, and reducing the sensitivity may miss small leaks.
[0003] Therefore, the above problems are further improved. SUMMARY
[0004] The main purpose of the application is to provide a gas leakage infrared detection algorithm with adaptive environmental noise suppression. By using the adaptive environmental noise suppression algorithm, the environmental noise interference is effectively eliminated while maintaining high sensitivity (ppm-level leakage can be detected), the detection stability and accuracy in complex scenes are improved, the problem of high false alarm rate and small leakage detection caused by environmental noise interference in infrared gas detection is solved, and high-precision gas leakage identification in dynamic scenes is realized.
[0005] To achieve the above purpose, the application provides a gas leakage infrared detection algorithm with adaptive environmental noise suppression, which combines wavelet transform and inter-frame difference method for noise suppression, and includes the following steps: Step S1: The input data is preprocessed. The environmental background radiation data including temperature, humidity and illumination are collected in real time by an environmental sensor array, input into an LSTM model to predict a dynamic noise baseline and calibrated; Step S2: Adaptive filtering is performed. The noise baseline is adjusted in combination with the NLMS algorithm to adjust the threshold and filter coefficient of the refrigeration-type detector, and the steady-state noise is suppressed; Step S3: Multi-frame fusion is performed. The continuous infrared image frames are analyzed in time and space domain, the wavelet transform is used to separate the high-frequency noise and low-frequency gas signal, the inter-frame difference method is used to calculate the difference image of adjacent frames, the gas diffusion form feature is enhanced, and each frame is assigned a weight according to the signal-to-noise ratio, and the final image is synthesized; Step S4: Post-processing, concentration quantization and leakage area marking processing are performed respectively.
[0006] As a further preferred technical solution of the above technical solution, the filter coefficient adjustment of step S2 is specifically implemented as: The filter coefficients as adaptive parameters are updated by the following formula and the step factor , which is: is the filter coefficient vector, representing the filter weight at the current time, is the step factor, controlling the rate of parameter update, is the input signal vector, containing sensor data of the current frame and historical frames, is the squared Euclidean norm of the input signal vector, i.e. where L is the filter order, is the error signal, defined as is the regularization constant, preventing the denominator from being zero; the update rate is synchronized with the infrared frame rate, updated once per frame; wherein, for is the original signal of the current frame, containing the target gas signal and environmental noise, is the filtered output signal, calculated by , wherein is the transpose of the filter coefficient.
[0007] As a further preferred technical solution of the above technical solution, step S3 is specifically implemented as: Step S3.1: For spatial-temporal domain analysis, wavelet decomposition is performed on consecutive preset number of infrared images, high-frequency and low-frequency components are extracted, gas edge features are retained, and high-frequency noise is filtered out; and noise coefficients are suppressed by threshold shrinkage method, with the formula being: is the jth coefficient after wavelet decomposition, is the preset threshold, is the coefficient after threshold processing (acts to shrink the wavelet coefficient, suppress noise, and retain effective signal; Step S3.2: For inter-frame difference method, the absolute difference between adjacent frames is calculated to highlight the dynamic changes of the gas leakage area and suppress static background interference; the difference image between adjacent frames is calculated to highlight the dynamic leakage area, with the formula being: is the pixel gray value of the adjacent two frames, is the pixel value of the difference image, representing the dynamic change intensity; Step S3.3: For weighted fusion, motion compensation weighted averaging method is adopted, first aligning consecutive frames based on optical flow method to eliminate scene displacement effect; then performing weighting strategy, with the weight being positively correlated with the signal-to-noise ratio of the frame, with the formula being: wherein fusion weight for the i-th frame, local signal-to-noise ratio for the i-th frame, calculated as wherein gas signal energy, noise energy, total number of fused frames.
[0008] As a further preferred technical solution of the above technical solution, for the optical flow method of step S3.3, ORB feature points are extracted, inter-frame displacement is estimated by Lucas-Kanade optical flow algorithm, and sub-pixel level alignment is performed.
[0009] As a further preferred technical solution of the above technical solution, for the fusion weight determination of step S3.3, dynamic adjustment is made according to the local signal-to-noise ratio of each frame, and the weight of a high SNR frame is higher. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 is a flowchart of the present application. DETAILED DESCRIPTION
[0011] The following description is provided to disclose the present application so that those skilled in the art can implement the present application. The preferred embodiments in the following description are only examples, and other obvious modifications can be made by those skilled in the art. The basic principles of the present application defined in the following description can be applied to other embodiments, modifications, improvements, equivalents and other technical solutions without departing from the spirit and scope of the present application.
[0012] In the preferred embodiments of the present application, those skilled in the art should note that the infrared gas detection device and the like involved in the present application can be regarded as prior art.
[0013] Preferred embodiments.
[0014] As Figure 1 shown, the present application discloses a gas leakage infrared detection algorithm for adaptive environmental noise suppression, which combines wavelet transform and inter-frame difference method for noise suppression, including the following steps: Step S1: pre-process the input data, collect environmental background radiation data including temperature, humidity, and illumination in real time through an environmental sensor array, input an LSTM model to predict a dynamic noise baseline and calibrate, and the specific implementation is: Step S1.1: input data: time series data collected by the sensor in real time: , which are temperature, humidity, illumination, and original radiation values, respectively, t=1, 2, …, N; standardization and sliding window: ; and Mean and standard deviation based on past W window; Construct window input: .
[0015] Step S1.2: LSTM single step calculation (time step τ), where: According to the forget gate, input gate, output gate, cell state candidate value, cell state and hidden state final output (full connection layer): (Predicted noise baseline radiation value).
[0016] Step S1.3: Loss function (training phase): , Real background radiation when there is no signal.
[0017] Step S1.4: Calibration signal: ; Between 0-1, it is a smoothing factor (suppress over-correction); Logical explanation: If , it is determined as an effective signal (such as gas leakage), otherwise it is considered as noise, Sensitivity threshold; Step S1.5: Adaptive parameter update: ; It is a forgetting factor, which dynamically adjusts the noise standard deviation.
[0018] Step S2: Perform adaptive filtering, adjust the threshold and filter coefficients of the refrigeration type detector according to the noise baseline and combine the NLMS (normalized least mean square) algorithm to suppress steady-state noise, where the following parameters are adjusted: (Sliding window length), (Smoothing factor), (Sensitivity threshold), and (Forgotten factor).
[0019] Step S3: Perform multi-frame fusion, perform space-time domain analysis on consecutive infrared image frames, separate high-frequency noise and low-frequency gas signal using wavelet transform, calculate the difference image of adjacent frames using the frame difference method, enhance the gas diffusion shape feature, and assign weights to each frame according to the signal-to-noise ratio, and synthesize the final image; Step S4: Post-processing, respectively for concentration quantization and leakage area marking processing, the specific implementation is: First, the quantization formula, taking butane as an example: Calculation steps: According to the gas coverage effective coordinate points, the multiple coordinate points gray scale values are superimposed, and the average value of the gray scale values is calculated ; 2. According to the random screening of 50 background coordinate points, the 50 coordinate points gray scale values are superimposed, and the average value of the gray scale values is calculated ; 3. Estimate the thickness of butane gas by Beer-Lambert Law: a. Formula: ; is the light intensity after the gas (corresponding to the gray value of the gas coverage area); is the background light intensity (corresponding to the gray value of the background area); is the molar absorption coefficient of butane (unit: L / mol·cm), the molar absorption coefficient of butane near 3.4 μm is about 10-100 L / mol·cm, and 50 L / mol·cm is taken; is the concentration of butane (unit: mol / L), the butane concentration of lighter is 0.001-0.01 mol / L; c=0.1 / (0.0821*298)≈0.0041 mol / L; is the thickness of butane gas (unit: cm).
[0020] b. Relationship between gray value and light intensity: Assuming that the gray value of the image is linearly related to the light intensity, the gray value can be directly substituted into the Beer-Lambert Law: ; is the gray value of the butane gas coverage area (0-255); is the gray value of the background area (0-255).
[0021] c. Solve the thickness of butane gas: Formula transformation, solve the thickness: .
[0022] 4. According to the lens field of view angle and the user input distance (m), calculate the visual width, formula: W=2*D*tan(Ø / 2); D is the user input distance; Ø is the lens field of view angle; Calculate the actual width (m) occupied by each pixel point; Pixel_d=W / 320; 6. Single pixel gas cloud volume: Gas_v = Pixel_d² * d(gas cloud thickness); 7.Total volume: 8. Total mass = total volume * density (2450g / m³): 9. First count how many grams are released in 10 seconds, and then expand it to grams per hour (g / h).
[0023] The second step is to mark the leakage area.
[0024] Specifically, the filter coefficient adjustment in step S2 is implemented as follows: The filter coefficients as adaptive parameters are realized by the following formula and the step size factor The update formula is: , is the filter coefficient vector, which represents the filter weight at the current moment, is the step size factor (0<μ<20<μ<2), which controls the rate of parameter update. is the input signal vector, which contains the sensor data of the current frame and the historical frame. is the Euclidean norm square of the input signal vector, that is ,in L is the filter order, is the error signal, defined as , is the regularization constant (usually 10 -6 ), to prevent the denominator from being zero; the update rate is synchronized with the infrared frame rate (30Hz), and is updated once per frame; Among them, for , is the original signal of the current frame, including the target gas signal and environmental noise, is the output signal after filtering, Calculated, where is the transpose of the filter coefficients.
[0025] More specifically, step S3 is implemented as follows: Step S3.1: For spatiotemporal analysis, perform wavelet decomposition on a preset number of consecutive frames (10 frames) of infrared images (obtained by the infrared gas detection equipment) to extract high-frequency (noise) and low-frequency (gas signal) components, retain gas edge features, and filter out high-frequency noise. Furthermore, the noise coefficient is suppressed using a threshold shrinkage method (such as soft thresholding). The formula is: , is the jth coefficient after wavelet decomposition (high-frequency components usually correspond to noise), preset threshold (adaptive adjustment according to noise level), threshold processing coefficient (acts on wavelet coefficient, suppresses noise (high frequency small coefficient is zero), retains effective signal (low frequency large coefficient)); Step S3.2: for inter-frame difference method, by calculating the absolute difference of adjacent frames, the dynamic change (such as diffusion, turbulence) of gas leakage area is highlighted, and the static background interference is suppressed, the difference image of adjacent frames is calculated, and the dynamic leakage area is highlighted, the formula is: , the pixel gray value of the adjacent two frames, the pixel value of the difference image, representing the dynamic change intensity; Step S3.3: for weighted fusion, motion compensation weighted average method is adopted, first aligning the continuous frames based on optical flow method, eliminating the influence of scene displacement; then the weighting strategy is carried out, the weight is positively correlated with the signal-to-noise ratio (SNR) of the frame, the formula is: , wherein the fusion weight of the i-th frame (range in [0, 1]), the local signal-to-noise ratio of the i-th frame, calculated as , wherein the gas signal energy, the noise energy, the total number of fusion frames (default N=10, because 10 frames can cover the short-time smoothness (about 0.33 seconds) of environmental noise, and increasing the number of fusion frames will delay the output, 10 frames balance between delay and noise reduction effect).
[0026] Further, for the optical flow method of step S3.3, extract the ORB feature points, estimate the inter-frame displacement by Lucas-Kanade optical flow algorithm, and perform sub-pixel level alignment.
[0027] Further, for the determination of fusion weight of step S3.3, dynamically adjust according to the local signal-to-noise ratio (SNR) of each frame, and the weight of high SNR frame is higher.
[0028] For the present application, the hardware modules required for the detection algorithm are realized, wherein: 1. Infrared detector module: Refrigeration type II superlattice mid-wave infrared focal plane detector (320x256 pixels, 3.2~3.5μm waveband).
[0029] Integrated Stirling cryocooler, working temperature 120K~150K, thermal noise reduced by 40%.
[0030] 2. Environmental sensor array: Temperature and humidity sensor, visible light camera, barometer, providing environmental noise baseline data.
[0031] 3. Data processing module: The FPGA chip implements a real-time noise suppression algorithm, supports multi-frame fusion and adaptive filtering.
[0032] 4. Display and control unit: Dual-light (visible light + infrared) image superimposed display, leakage area is automatically marked and output quantitative concentration data.
[0033] It is worth mentioning that the technical features of the infrared gas detection device and the like involved in the present patent application should be regarded as prior art, and the specific structure, working principle and possible control mode, spatial arrangement mode of these technical features can be selected conventionally in the art, and should not be regarded as the invention point of the present patent, and the present patent will not be further expanded and detailed.
[0034] For those skilled in the art, the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced equivalently, and any modification, equivalent replacement, improvement and the like made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A gas leak infrared detection algorithm with adaptive environmental noise suppression, characterized in that: Combining wavelet transform with inter-frame difference method to perform noise suppression includes the following steps: Step S1: Preprocess the input data, collect environmental background radiation data including temperature, humidity, and light in real time through the environmental sensor array, input it into the LSTM model to predict the dynamic noise baseline and perform calibration; Step S2: Adaptive filtering is performed to adjust the threshold and filter coefficient of the cooling detector according to the noise baseline and in combination with the NLMS algorithm to suppress steady-state noise; Step S3: Multi-frame fusion is performed to analyze the spatiotemporal domain of continuous infrared image frames. Wavelet transform is used to separate high-frequency noise and low-frequency gas signals. The difference image of adjacent frames is calculated by combining the inter-frame difference method to enhance the gas diffusion morphological characteristics. A weight is assigned to each frame according to the signal-to-noise ratio to synthesize the final image. Step S4: Post-processing, performing concentration quantification and leakage area marking processing respectively.
2. The gas leak infrared detection algorithm with adaptive environmental noise suppression according to claim 1 is characterized in that: The filter coefficient adjustment in step S2 is specifically implemented as follows: The filter coefficients as adaptive parameters are realized by the following formula and the step size factor The update formula is: , is the filter coefficient vector, which represents the filter weight at the current moment, is the step size factor, which controls the rate of parameter update. is the input signal vector, which contains the sensor data of the current frame and the historical frame. is the Euclidean norm square of the input signal vector, that is ,in L is the filter order, is the error signal, defined as , is a regularization constant to prevent the denominator from being zero; the update rate is synchronized with the infrared frame rate and is updated once per frame; Among them, for , is the original signal of the current frame, including the target gas signal and environmental noise, is the output signal after filtering, Calculated, where is the transpose of the filter coefficients.
3. The gas leak infrared detection algorithm with adaptive environmental noise suppression according to claim 2 is characterized in that: Step S3 is specifically implemented as follows: Step S3.1: For spatiotemporal analysis, wavelet decomposition is performed on a preset number of consecutive infrared image frames to extract high-frequency and low-frequency components, retain gas edge features, and filter out high-frequency noise. The noise coefficient is then suppressed using the threshold shrinkage method, using the formula: , is the jth coefficient after wavelet decomposition, is the preset threshold, is the coefficient after threshold processing (its function is to shrink the wavelet coefficients, suppress noise and retain effective signals; Step S3.2: For the inter-frame difference method, the absolute difference between adjacent frames is calculated to highlight the dynamic changes of the gas leakage area and suppress static background interference. The difference image between adjacent frames is calculated to highlight the dynamic leakage area. The formula is: , is the pixel grayscale value of two adjacent frames, is the pixel value of the difference image, indicating the intensity of dynamic changes; Step S3.3: For weighted fusion, a motion-compensated weighted averaging method is used. First, consecutive frames are aligned based on the optical flow method to eliminate the effect of scene displacement. Then, a weighted strategy is applied, with the weight being positively correlated with the signal-to-noise ratio of the frame. The formula is: ,in is the fusion weight of the i-th frame, is the local signal-to-noise ratio of the i-th frame, calculated as ,in is the gas signal energy, is the noise energy, is the total number of fused frames.
4. The gas leak infrared detection algorithm with adaptive environmental noise suppression according to claim 3 is characterized in that: For the optical flow method in step S3.3, ORB feature points are extracted, and the inter-frame displacement is estimated using the Lucas-Kanade optical flow algorithm to perform sub-pixel alignment.
5. The gas leak infrared detection algorithm with adaptive environmental noise suppression according to claim 4 is characterized in that: For the fusion weight determination in step S3.3, it is dynamically adjusted according to the local signal-to-noise ratio of each frame, and the high SNR frame has a higher weight.
Citation Information
Cited By
Infrared image noise reduction method and system for gas leakage detection
CN121504759A
Low-concentration gas leakage detection method based on self-adaptive digital phase-locked amplification algorithm
CN121594332A