Gas identification and quantification method
By combining infrared multispectral image detectors with time-domain segmentation and spectral feature matching, the problems of short monitoring distance and inaccurate quantification in existing gas detection technologies have been solved, achieving high-precision gas concentration quantification and detection.
Patent Information
- Application Number
- PCT/CN2024/121377
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-09
- Filing Date
- 2024-09-26
- Publication Date
- 2026-01-15
AI Technical Summary
Existing gas detection technologies are susceptible to wind speed and direction, have short monitoring distances, delayed alarms, and are difficult to achieve highly sensitive, long-distance, and wide-range quantitative gas concentration measurements.
By employing an infrared multispectral image detector, and through time-domain segmentation, spatial morphology analysis, and spectral feature matching, combined with spatial gradient modulus calculation of infrared multispectral images and multispectral background images, the influence of interference factors is eliminated, and gas concentration can be quantitatively determined.
It improves the accuracy and robustness of gas concentration detection, enabling high-precision gas detection, classification, and concentration quantification in complex environments.
Smart Images

Figure CN2024121377_15012026_PF_FP_ABST
Abstract
Description
A method for gas identification and quantification Technical Field
[0001] This invention relates to the field of gas concentration detection technology, specifically a method for gas identification and quantification. Background Technology
[0002] Gas detection technology has important applications in environmental protection and industrial safety. Detecting and promptly repairing even minor leaks helps reduce energy waste and greenhouse gas emissions, mitigating global warming. Gas detection technology can also help detect leaks of toxic, harmful, flammable, and explosive gases in industrial production sites, preventing major accidents and protecting human health and property. Currently, gas detection mainly relies on point sensors, but these are susceptible to wind speed and direction, and have limitations such as short monitoring distance and alarm lag. Developing new gas detection technologies with long-range, wide-area, and high-sensitivity capabilities is of great significance. Optical gas imaging technology, especially non-contact, visual infrared spectral video gas imaging technology, has become one of the important technologies to meet current needs due to its ability to acquire gas concentration distribution and location information. This technology is divided into active and passive detection types based on the presence or absence of a light source. Furthermore, based on the number of spectral channels in infrared spectral imaging technology, it is further divided into infrared monospectral, multispectral, and hyperspectral types. Each technology has its advantages and application scenarios, but overall, gas imaging applications still face shortcomings and problems such as susceptibility to environmental factors, poor stability, difficulty in quantification, and inaccurate quantification.
[0003] Summary of the Invention
[0004] In view of the above-mentioned problems of the prior art, the present invention provides a gas identification and quantification method that comprehensively utilizes time domain segmentation, spatial morphology analysis and spectral domain feature matching, effectively eliminating the influence of many interference factors, realizing high-precision gas concentration quantification, and can be applied to remote high-precision monitoring of toxic and harmful gases in the fields of environmental protection and industrial safety.
[0005] To achieve the above objectives, the first aspect of this application provides a gas identification and quantification method, the method comprising:
[0006] N-channel infrared multispectral images are obtained using an infrared multispectral image detector. IN ;
[0007] For the infrared multispectral image I IN Background subtraction was performed to extract the multispectral foreground mask I containing the moving object. FM Multispectral background image I without moving objects B ;
[0008] Using multispectral background image I B and infrared multispectral images IIN Calculate the foreground contrast image I R ;
[0009] Foreground Comparison Image I R Spectral feature matching with a gas spectral feature database yields gas type index map I. Type Gas Foreground Mask Figure I GM * ;
[0010] Gas contours are obtained by contour extraction and shape filtering of the gas foreground mask image. The gas type index GasType(i) and gas contour mask image I are calculated for each gas contour based on the gas type index image. GCM (i);
[0011] Calculate the infrared multispectral image I respectively IN Infrared multispectral sub-plots for each channel I IN The first spatial gradient magnitude distribution diagram of (n)
[0012] Calculate the multispectral background image I separately B Multispectral background sub-image for each channel I B The second spatial gradient magnitude distribution diagram of (n)
[0013] According to the first spatial gradient magnitude distribution map Second spatial gradient mode distribution diagram The gas permeability distribution τ was calculated. gas (n); the calculation formula is as follows:
[0014] Where x and y represent the x-coordinate and y-coordinate of the element in the graph, respectively, τ gas (x,y,n) is the transmittance distribution diagram τ gas (n) The transmittance value at pixel coordinates (x, y). The first spatial gradient magnitude distribution diagram The first gradient value at pixel coordinates (x, y). The second spatial gradient magnitude distribution diagram The second gradient value at pixel coordinates (x, y);
[0015] Based on the profile gas type index GasType(i) and gas permeability distribution map τ gas (n) The gas column concentration distribution map is calculated;
[0016] Based on gas profile mask I GCM (i) Generate a gas concentration map from the gas column concentration distribution map.
[0017] As one possible implementation of the first aspect, the foreground contrast image I... R Spectral feature matching is performed with a gas spectral feature database to obtain a gas type index map and a gas foreground mask map, specifically including:
[0018] For multispectral foreground mask I FM Perform union operation to synthesize joint foreground mask I CFM ;
[0019] Extracting the joint foreground mask I CFM The non-zero pixel coordinates correspond to the foreground contrast image I. R The values of each channel of the pixel coordinates are used as spectral feature vectors;
[0020] Calculate the correlation score I between the spectral feature vector and the spectral feature vectors of M gas samples in the gas spectral feature database. G (x,y,m) yields the spectral feature matching diagram I for each gas. G (m); All spectral feature matching maps constitute spectral feature matching map set I G ;
[0021] For each pixel coordinate (x, y), in the gas spectral feature matching atlas I G The algorithm iterates through the data to find the pixel coordinate with the highest relevance score and records it in I. G * (x, y) represents the index value of the gas spectral feature matching map corresponding to the highest correlation score of the pixel coordinates, recorded in I. Type (x,y); the highest correlation score I for all pixel coordinates (x,y). G * (x,y) form I G * All the index values I Type (x,y) Gas Type Index Chart I Type ;
[0022] to I G * Thresholding is performed to obtain the gas foreground mask image I. GM * .
[0023] As one possible implementation of the first aspect, the correlation score I G The calculation method for (x, y, m) is as follows:
[0024] In the above formula, [I R (x,y,1),IR (x,y,2),...,I R (x,y,n),...,I R [x,y,N)] is the spectral feature vector of pixel coordinates (x,y), s m I is the feature vector of the gas sample. G (x,y,m) represents the spectral feature vector of pixel (x,y) and the gas sample feature vector s. m The correlation score between them isI R The average plot of all channels, It is s m The average value, s m (n) is the gas sample feature vector s m The value of the nth spectral channel.
[0025] As one possible implementation of the first aspect, the following steps were also included:
[0026] Define morphological feature evaluation indicators and morphological feature vectors for screening gas profiles; the morphological feature evaluation indicators include area, aspect ratio, convex hull area ratio, roundness, edge sharpness, and historical profile overlap rate;
[0027] The morphological feature evaluation index of the sample gas profile is calculated to obtain the gas sample morphological feature vector.
[0028] As one possible implementation of the first aspect, the gas contour is obtained by contour extraction and shape filtering of the gas foreground mask image, and the gas type index GasType(i) and gas contour mask image I for each gas contour are determined according to the gas type index image. GCM (i), specifically including:
[0029] For the gas foreground mask image I GM * Perform contour extraction to extract one or more contours;
[0030] Calculate the morphological feature evaluation indexes for each of the contours;
[0031] Candidate morphological feature vectors for multiple contours are calculated based on the morphological feature evaluation index of multiple contours.
[0032] The candidate morphological feature vectors of multiple contours are matched with the sample morphological feature vectors respectively to filter out gas contours that meet the gas characteristics.
[0033] The gas type index GasType(i) of the gas profile is determined based on the gas type index map, and the gas profile is synthesized into a gas profile mask map I.GCM (i).
[0034] As one possible implementation of the first aspect, the gas type index diagram I Type The overall profile gas type index GasType(i) is determined, specifically including:
[0035] For each selected contour, the coordinate range of the extracted contour corresponds to the gas type index map I. Type The gas index values of all pixels in the contour are counted, and the gas index value with the largest number is selected as the contour gas type index GasType(i) for the entire contour.
[0036] As one possible implementation of the first aspect, the method is based on the profile gas type index GasType(i) and the transmittance distribution map τ. gas (n) The calculated gas column concentration distribution map includes:
[0037] For each profile i, based on the gas type index GasType(i), the molecular absorption cross-sectional coefficient σ(i,n) of the corresponding gas is retrieved from the spectral database; based on the transmittance distribution map τ... gas (n), molecular absorption cross-section coefficient σ(i,n), calculate the gas column concentration plot c for each gas profile. gas (i), the calculation formula is as follows:
[0038] Among them, c gas (x,y,i) represents the gas column concentration plot c. gas (i) Gas concentration value at coordinate (x,y), s m (n) is the spectral feature vector of the gas sample, τ gas (x,y,n) is the transmittance distribution diagram τ gas (n) The transmittance value at pixel coordinates (x, y), c gas (i) Gas column concentration distribution diagram of profile i, where σ(i,n) is the molecular absorption cross-section coefficient, N A is Avogadro's constant.
[0039] As one possible implementation of the first aspect, the generated gas concentration map is visualized.
[0040] A second aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method described in the first aspect.
[0041] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in the first aspect.
[0042] Compared with existing technologies, the significant advantages of this invention are as follows: This invention acquires multi-channel infrared images using an infrared multispectral image detector, and independently performs background segmentation, spectral matching, and morphological screening on the multi-channel infrared images before calculating the gas concentration using a gas inversion model. The gas concentration calculation process is the first to propose a method using the ratio of the spatial gradient modulus of the infrared multispectral image and the multispectral background image to determine the gas transmittance, effectively eliminating the influence of gas radiation, atmospheric radiation, and infrared system bias. The entire algorithm comprehensively utilizes temporal, spatial, and spectral information, improving the accuracy and robustness of gas target detection. Through this multi-dimensional analysis, the algorithm can effectively handle gas detection, classification, and concentration quantification tasks under complex backgrounds, providing a relatively complete approach for gas detection and analysis. Attached Figure Description
[0043] The various features of the present invention and the relationships between them are further explained below with reference to the accompanying drawings. The drawings are exemplary; some features are not shown to scale, and some drawings may omit conventional features in the field of this application that are not essential to this application, or additional features that are not essential to this application may be shown. The combination of features shown in the drawings is not intended to limit the present application. Furthermore, throughout this specification, the same reference numerals refer to the same things. Specific descriptions of the drawings are as follows:
[0044] Figure 1 is a schematic flowchart of an embodiment of a gas identification and quantification method provided in this application.
[0045] Figure 2 is a flowchart illustrating the process of determining the gas type index and gas profile mask for each gas profile according to an embodiment of this application.
[0046] Figure 3 shows a single-channel example of the acquired infrared multispectral image.
[0047] Figure 4 shows an example of a single channel of the multispectral background image.
[0048] Figure 5 shows an example of the distribution of the first spatial gradient modulus.
[0049] Figure 6 shows an example of the distribution of the second spatial gradient modulus.
[0050] Figure 7 shows an example of a gas permeability distribution map.
[0051] Figure 8 is an example of a gas index diagram provided in an embodiment of this application.
[0052] Figure 9 shows the calculated gas column concentration.
[0053] Figure 10 shows an example of the output rendering. Detailed Implementation
[0054] The terms "first, second, third, etc." or similar terms such as module A, module B, module C, etc., used in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that a specific order or sequence may be interchanged where permitted so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0055] In the following description, the labels of the steps, such as S110, S120, etc., do not necessarily mean that the steps will be executed in this way. The order of the steps can be interchanged or executed simultaneously if permitted.
[0056] The term "comprising" as used in the specification and claims should not be construed as limiting itself to what follows; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the mentioned feature, integral, step, or component, but does not exclude the presence or addition of one or more other features, integrals, steps, or components, or groups thereof. Thus, the statement "device comprising means A and B" should not be limited to a device consisting solely of components A and B.
[0057] The term "an embodiment" or "an embodiment" as used in this specification means that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in at least one embodiment of the invention. Therefore, the terms "in one embodiment" or "in an embodiment" appearing throughout this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. Furthermore, in one or more embodiments, the particular features, structures, or characteristics can be combined in any suitable manner, as will be apparent to those skilled in the art from this disclosure.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. In case of any inconsistency, the meaning set forth in this specification or derived from the content described herein shall prevail. Furthermore, the terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit the scope of this application.
[0059] Figure 1 is a flowchart illustrating an embodiment of a gas identification and quantification method provided in this application. As shown in Figure 1, a gas identification and quantification method includes:
[0060] N-channel infrared multispectral images are obtained using an infrared multispectral image detector. IN ;
[0061] For the infrared multispectral image I IN Background subtraction was performed to extract the multispectral foreground mask I containing the moving object. FM Multispectral background image I without moving objects B ;
[0062] Using multispectral background image I B and infrared multispectral images I IN Calculate the foreground contrast image I R ;
[0063] Foreground Comparison Image I R Spectral feature matching with a gas spectral feature database yields gas type index map I. Type Gas Foreground Mask Figure I GM * ;
[0064] Gas contours are obtained by contour extraction and shape filtering of the gas foreground mask image. The gas type index GasType(i) and gas contour mask image I are calculated for each gas contour based on the gas type index image. GCM (i);
[0065] Calculate the infrared multispectral image I respectively IN Infrared multispectral sub-plots for each channel I IN The first spatial gradient magnitude distribution diagram of (n)
[0066] Calculate the multispectral background image I separately B Multispectral background sub-image for each channel I B The second spatial gradient modulus of (n)
[0067] According to the first spatial gradient magnitude distribution map Second spatial gradient mode distribution diagram The gas permeability distribution τ was calculated. gas (n); the calculation formula is as follows:
[0068] Where x and y represent the x-coordinate and y-coordinate of the element in the graph, respectively, τ gas (x,y,n) is the transmittance distribution diagram τ gss (n) The transmittance value at pixel coordinates (x, y). The first spatial gradient magnitude distribution diagram The first gradient value at pixel coordinates (x, y). The second spatial gradient magnitude distribution diagram The second gradient value at pixel coordinates (x, y);
[0069] Based on the profile gas type index GasType(i) and gas permeability distribution map τ gas (n) The gas column concentration distribution map is calculated;
[0070] Based on gas profile mask I GCM (i) Generate a gas concentration map and visualize it.
[0071] This application acquires multi-channel infrared images using an infrared multispectral image detector. After background segmentation, spectral feature matching, and morphological screening of the infrared images, the gas concentration is calculated using a gas inversion model. The entire algorithm comprehensively utilizes temporal, spatial, and spectral information, improving the accuracy and robustness of gas target detection. In particular, for gas concentration quantification, it proposes a method to calculate transmittance using the ratio of the gradient moduli of the infrared multispectral image and the multispectral background image, eliminating interference from gas temperature, atmospheric radiation, additive noise, and system bias. Through the above multi-dimensional analysis, the algorithm can effectively handle gas detection tasks in complex backgrounds, providing a relatively complete approach for gas detection, classification, and concentration quantification.
[0072] Specifically, for the step of obtaining an N-channel infrared multispectral image I through an infrared multispectral image detector IN This application uses an infrared multispectral image detector, including but not limited to multiple infrared cameras equipped with narrowband filters of different bands, to acquire infrared images. The passbands of the narrowband filters in each channel differ to obtain responses in different spectral bands. This application also performs basic correction and preprocessing on the infrared images. A single channel of the acquired infrared multispectral image is shown in Figure 3, and a single channel of the multispectral background image is shown in Figure 4.
[0073] Specifically, for the step of the infrared multispectral image I IN The main purpose of background subtraction processing is to accurately and quickly identify and segment the multispectral foreground mask containing moving objects from the acquired multispectral infrared multispectral images. FM Multispectral background image I without moving objects B The specific subtraction process is as follows:
[0074] Using N background subtractors, perform processing on N input infrared multispectral images I IN The process is performed, and the processed multispectral background image I is output. B and multispectral foreground mask I FM .
[0075] I B ={I B (0),I B (1),…,IB (N-1)}
[0076] I FM ={I FM (0),I FM (1),…,I FM (N-1)}
[0077] Among them, multispectral background image I B and multispectral foreground mask I FM Each has N channels.
[0078] Specifically, using multispectral background images I B and infrared multispectral images I IN Calculate the foreground contrast image I R The specific calculation method is as follows:
[0079] Among them, I R It has N channels, I R (n) is the foreground contrast image of the nth channel.
[0080] This application utilizes multiple background subtraction algorithms to analyze the temporal variations between video frames in each channel, identifying and separating flowing gas pixels. Background subtraction primarily involves dynamically modeling the background of the input spectral channels to separate the foreground and background images. Mature methods such as the Mixture of Gaussians (MOG), Visual Background Extractor (ViBe), and Codebook Model can be directly used for background subtraction.
[0081] A further preferred embodiment of this application includes global motion detection. For N input infrared multispectral images I IN The process involves calculating the time-domain difference map, taking the maximum difference value, calculating the average value, and determining whether significant motion exists based on a set threshold. This allows for the identification of infrared multispectral images. IN The intensity and existence of global motion.
[0082] motion_detected = M t >threshold
[0083] The detailed steps are as follows:
[0084] Input: Receive the image sequence of the current frame and the previous frame, and determine the motion detection threshold.
[0085] Calculate the temporal difference: For each pair of current frame and previous frame images, calculate their difference image and take the absolute value to obtain the temporal difference map.
[0086] Calculate the maximum difference image: Take the maximum value of all difference images to obtain the maximum difference image.
[0087] Calculate the average value M of the maximum difference plot: t , as a measure of global motion intensity.
[0088] Determine if significant global motion exists: [M] t Compare with the threshold; if M t If the value is greater than the threshold, then significant global motion is considered to exist.
[0089] This application identifies whether there is global motion in a scene by extracting the temporal maximum difference map of an infrared multispectral image, thereby resetting the background subtraction and solving the problem of background subtraction model failure caused by large scene motion.
[0090] Specifically, foreground comparison chart I R Spectral feature matching with a gas spectral feature database yields gas type index map I. Ty[e Gas Foreground Mask Figure I GM * .
[0091] (1) Gas Spectral Feature Database. The gas spectral feature database stores the spectral feature data of various gas samples generated by simulation.
[0092] The simulation method for generating a gas spectral feature database is as follows:
[0093] By combining the background Planck radiation spectrum, gas spectral transmittance curve, optical system spectral transmittance curve, and detector spectral response curve, the specific temperature T can be calculated. bkg The system response value for each gas in each wavelength band at the temperature determined by the application scenario. The spectral characteristic value s(m,n) of a specific gas m in a specific wavelength band n in the gas spectral characteristic database is calculated as follows:
[0094] In the above formula, n is the channel number, m is the gas index number, and τ filter (λ) represents the spectral response curve of the filter, R v (λ) represents the system response curve, τ gas (m,λ) represents the gas permeability curve, and T... bkg For background temperature, L bkg (λ,T bkg (T) represents the background temperature. bkgThe emissivity at λ is obtained using Planck's blackbody radiation law, where λ is the wavelength. a (n) and λ b (n) represents the spectral range of the nth channel.
[0095] Assuming there are N spectral bands and M types of gases, the detectivity curves of all sample gases form a foreground spectral feature library matrix, represented as follows:
[0096] In the above formula, s(m,n) is the characteristic value of the Nth band for the Mth gas. For convenience, s is used. m s represents the feature vector of the gas sample of the m-th gas. m =[s(m,0),s(m,1),...,s(m,n)...,s(m,N-1)].
[0097] (2) Spectral feature matching
[0098] For multispectral foreground mask I FM Perform union operation to synthesize joint foreground mask I CFM ;
[0099] Extracting the joint foreground mask I CFM The non-zero pixel coordinates correspond to the foreground contrast image I. R The values of each channel of the pixel coordinates are used as spectral feature vectors;
[0100] The correlation score I between the spectral eigenvector of each coordinate and the spectral eigenvector of the gas sample is calculated sequentially. G (x,y,m) yields the spectral feature matching diagram I for each gas. G (m). All spectral feature matching maps constitute spectral feature matching map set I. G ={I G (1),I G (2),...,I G (m)...,I G (M)}.
[0101] Correlation Score I G The Pearson correlation coefficient (PCC) can be used to calculate (x, y, m), and the formula is as follows:
[0102] In the above formula, [I R (x,y,1),I R (x,y,2),...,I R (x,y,n),...,I R[x,y,N)] is the spectral feature vector of pixel coordinates (x,y), s m I is the feature vector of the gas sample. G (x,y,m) represents the spectral feature vector of pixel (x,y) and the gas sample feature vector s. m The correlation score between them isI R The average plot of all spectral channels It is s m The average value, s m (n) is the gas sample feature vector s m The value of the nth spectral channel.
[0103] (3) Best Match Determination
[0104] For each pixel coordinate (x, y), in the gas spectral feature matching atlas I G The algorithm iterates through the data to find the pixel coordinate with the highest relevance score and records it in I. G * (x, y) represents the index value of the gas spectral feature matching map corresponding to the highest correlation score of the pixel coordinates, recorded in I. Type (x,y); the highest correlation score I for all pixel coordinates (x,y). G * (x,y) form I G * All the index values I Type (x,y) Gas Type Index Chart I Type .
[0105] The formula for calculating the index value is expressed as follows:
[0106] A gas index diagram is shown in Figure 8, for example.
[0107] Specifically, for I G * Thresholding is performed to obtain the gas foreground mask image I. GM * .
[0108] (4) Gas foreground mask synthesis
[0109] A threshold θ is set to determine whether a pixel belongs to the foreground of the target gas.
[0110] After the above calculations, all I GM * (x,y) Gas Foreground Mask Diagram I GM * .
[0111] In this application, the gas foreground mask generation process takes into account the diffusion characteristics of the gas and the spectral absorption characteristics of a specific gas. At the same time, the best matching gas is selected in the above process to realize the gas type identification function.
[0112] Specifically, this application also includes the following steps before performing the above steps:
[0113] Define morphological feature evaluation indicators and morphological feature vectors for screening gas profiles; the morphological feature evaluation indicators include area, aspect ratio, convex hull area ratio, roundness, and edge sharpness;
[0114] The specific, detailed steps are as follows:
[0115] Based on the gas diffusion distribution characteristics, six morphological feature evaluation indicators were defined: area, aspect ratio, convex hull area ratio, roundness, edge sharpness, and historical contour overlap rate. Based on these six morphological feature evaluation indicators, a morphological feature vector F was defined.
[0116] The following morphological feature evaluation indicators are defined and can be used to screen gas profiles:
[0117] a) Area (A). The area metric is used to quantify the total number of pixels within the outline of an object, and can be calculated by directly counting the number of pixels within the image outline.
[0118] b) Aspect Ratio (AR). The aspect ratio is the ratio of the width to the height of the bounding rectangle of an object, used to describe the extent to which the object extends. It is obtained by calculating the ratio of the width to the height of the smallest bounding rectangle that encloses the outline, i.e., aspect ratio = width / height.
[0119] c) Convex Hull Area Ratio. The convex hull area ratio is the ratio of the area of an object's outline to the area of its convex hull. The convex hull is the smallest convex shape that contains the outline. The calculation steps are: ① First, calculate the convex hull of the outline. ② Calculate the outline area and the convex hull area. ③ Convex hull area ratio = outline area / convex hull area.
[0120] d) Roundness. Roundness describes how closely an object's shape approximates a circle. The roundness of an ideal circle is 1. Calculation method:
[0121] e) Edge Sharpness. Edge sharpness measures the clarity or distinctness of a contour edge. Calculation method: It is evaluated by calculating the intensity of the edge pixel gradient, typically using the Sobel operator or the Canny edge detector to determine edge strength.
[0122] f) History Overlap Ratio. This compares the overlap between the current contour and the historically stored contour set. Calculation method: ① Calculate the intersection area of the two contours. ② Overlap Ratio = Intersection Area /
[0123] Area of contour A + Area of contour B - Area of intersection.
[0124] Based on the morphological feature evaluation indicators defined above, the morphological feature vector F can be constructed as a vector containing all these quantitative indicators.
[0125] F = [Area, Aspect Ratio, Convex Hull Area Ratio, Roundness, Edge Sharpness, Historical Outline Overlap Rate]
[0126] The morphological feature evaluation index of the sample gas profile is calculated using the above calculation method, resulting in the gas sample morphological feature vector F0. The gas sample morphological feature vector F0 is used to match candidate feature vectors in subsequent morphological screening steps.
[0127] As shown in Figure 2, for the step of determining the gas type index GasType(i) and gas profile mask I for each gas profile based on the gas type index map, GCM (i) Specifically includes:
[0128] For the gas foreground mask image I GM * Perform contour extraction to extract one or more contours;
[0129] Calculate the morphological feature evaluation indexes for each of the contours;
[0130] Candidate morphological feature vectors for multiple contours are calculated based on the morphological feature evaluation index of multiple contours.
[0131] The candidate morphological feature vectors of multiple contours are matched with the sample morphological feature vectors respectively to filter out gas contours that meet the gas characteristics.
[0132] The gas type index GasType(i) of the gas profile is determined based on the gas type index map, and the gas profile is synthesized into a gas profile mask map I. GCM (i). Specifically, for each selected contour, the coordinate range of the extracted contour corresponds to the gas type index map I. Type The gas index values of all pixels in the contour are counted, and the gas index value with the largest number is selected as the contour gas type index GasType(i) for the entire contour.
[0133] This application performs contour extraction and shape screening on a gas foreground mask image to obtain a contour that conforms to the gas characteristics, and generates a gas contour mask image I.GCM (i) simultaneously obtains the gas type index GasType(i) for each contour, thus obtaining the corresponding gas type for each contour. In this application, the spatiotemporal characteristics of the contours are comprehensively considered. Based on the unique characteristics of gas targets in terms of shape, size, and texture, a set of morphological feature evaluation indicators are defined to score the detected foreground regions, filter out the regions most likely to represent the target gas, and output the gas region mask image.
[0134] Specifically, the actual gas concentration is calculated based on the gas region mask image. The calculation method is as follows:
[0135] (1) Spatial gradient modulus calculation. Calculate the spatial gradient modulus of the infrared multispectral image I. IN Infrared multispectral sub-plots for each channel I IN The first spatial gradient magnitude distribution diagram of (n) As shown in Figure 5;
[0136] Calculate the multispectral background image I separately B Multispectral background sub-image for each channel I B The second spatial gradient magnitude distribution diagram of (n) As shown in Figure 6;
[0137] Where n is the spectral channel number.
[0138] (2) Transmittance distribution map calculation. Based on the first spatial gradient mode distribution map. Second spatial gradient mode distribution diagram The gas permeability distribution τ was calculated. gas (n); the calculation formula is as follows:
[0139] Where x and y represent the x-coordinate and y-coordinate of the element in the graph, respectively, τ gas (x,y,n) is the transmittance distribution diagram τ gss (n) The transmittance value at pixel coordinates (x, y). The first spatial gradient magnitude distribution diagram The first gradient value at pixel coordinates (x, y). The second spatial gradient magnitude distribution diagram The second gradient value at pixel coordinates (x, y). The calculated gas transmittance distribution is shown in Figure 7.
[0140] (3) Calculation of gas concentration.
[0141] a. Determine the molecular absorption cross section. For each morphologically screened profile, based on the gas type of the profile, find the molecular absorption cross section coefficient σ(n) corresponding to the gas from the database, where n corresponds to the spectral channel.
[0142] b. Concentration Calculation. For each profile i, based on the profile gas type index GasType(i), the molecular absorption cross-sectional coefficient σ(i,n) of the corresponding gas is retrieved from the spectral database; based on the transmittance distribution map τ... gas (n), molecular absorption cross-section coefficient σ(i,n), calculate the gas column concentration plot c for each gas profile. gas (i), the calculation formula is as follows:
[0143] Where i is the contour index, c gas (x,y,i) represents the gas column concentration plot c. gas (i) Gas concentration value at coordinate (x,y), s m (n) is the spectral feature vector of the gas sample, τ gas (x,y,n) is the transmittance distribution diagram τ gas (n) The transmittance value at pixel coordinates (x, y), c gas (i) Gas column concentration distribution diagram of profile i, where σ(i,n) is the molecular absorption cross-section coefficient, N A Let be Avogadro's constant. The calculated gas column concentration diagram is shown in Figure 9.
[0144] The gas concentration corresponding to each gas profile can be calculated using the above formula, and recorded as the gas column concentration distribution map c corresponding to each gas profile. gas (i).
[0145] The main advantage of the above-mentioned quantitative calculation model for gas concentration lies in the fact that the use of spatial gradients eliminates the influence of gas radiation, atmospheric radiation, and infrared system bias.
[0146] This application utilizes the aforementioned spatial gradient method to effectively eliminate the effects of gas radiation, atmospheric radiation, and infrared system bias.
[0147] Specifically, to further improve the inversion accuracy, this application also includes further filtering of the gas concentration map. This is achieved by comprehensively utilizing the correlation of spatial neighborhood pixels combined with optimization theory. To minimize the difference between the observed values and model predictions of all neighborhood pixels, and taking advantage of the continuity of neighborhood concentration, a spatial continuity regularization term is added to the objective function:
[0148] Where (i,j) are the image coordinates being traversed, W is the image width, H is the image height, and c gas (i,j) represents the concentration observation at pixel coordinates (i,j), c gas *(i,j) represents the concentration estimate at pixel coordinates (i,j). The term represents the range of neighborhood coordinate offsets; α is a regularization parameter that controls the strength of neighborhood continuity. In the above formula, the regularization term... Forcing spatially adjacent pixels to have similar gas concentrations helps suppress concentration fluctuations in images caused by noise or discontinuous sampling.
[0149] To intuitively mark the gas region and concentration in the output image and facilitate user use, this application maps the gas concentration map into a color map and overlays the color map onto the infrared image for visualization.
[0150] Specifically, depending on the application, an appropriate visualization scheme is selected to display the gas profile mask, gas type, and gas concentration for each profile. For example, different gas profile masks can be used... GCM In the superimposed infrared multispectral images, different colors are set according to the gas type corresponding to each contour, and the corresponding gas concentration c_gas is displayed around the contour. A rendering example is shown in Figure 10.
[0151] This invention performs analysis and processing in time, space, and spectral space, improving the accuracy and robustness of gas identification and segmentation. By using the spatial gradient of infrared multispectral images and multispectral background images to calculate the transmittance distribution map, the influence of environmental and system biases is effectively eliminated, enabling high-precision gas concentration estimation.
[0152] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0153] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present application has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, all of which fall within the scope of protection of the present invention.
Claims
A gas identification and quantification method, characterized in that, The method includes: N-channel infrared multispectral images are obtained using an infrared multispectral image detector. IN ; For the infrared multispectral image I IN Background subtraction was performed to extract the multispectral foreground mask I containing the moving object. FM Multispectral background image I without moving objects B ; Using multispectral background image I B and infrared multispectral images I IN Calculate the foreground contrast image I R ; Foreground Comparison Image I R Spectral feature matching with a gas spectral feature database yields gas type index map I. Type Gas Foreground Mask Figure I GM * ; Gas contours are obtained by contour extraction and shape filtering of the gas foreground mask image. The gas type index GasType(i) and gas contour mask image I are calculated for each gas contour based on the gas type index image. GCM (i); Calculate the infrared multispectral image I respectively IN Infrared multispectral sub-plots for each channel I IN The first spatial gradient magnitude distribution diagram of (n) Calculate the multispectral background image I separately B Multispectral background sub-image for each channel I B The second spatial gradient magnitude distribution diagram of (n) According to the first spatial gradient magnitude distribution map Second spatial gradient mode distribution diagram The gas permeability distribution τ was calculated. gas (n); the calculation formula is as follows: Where x and y are the x-coordinate and y-coordinate of the graph, respectively, and τ gas (x,y,n) is the transmittance distribution diagram τ gas (n) The transmittance value at pixel coordinates (x, y). The first spatial gradient magnitude distribution diagram The first gradient value at pixel coordinates (x, y). The second spatial gradient magnitude distribution diagram The second gradient value at pixel coordinates (x, y); Based on the profile gas type index GasType(i) and gas permeability distribution map τ gas (n) The calculated gas column concentration distribution map includes: For each profile i, based on the profile gas type index GasType(i), the molecular absorption cross-sectional coefficient σ(i,n) of the corresponding gas is retrieved from the spectral database; based on the transmittance distribution map τ... gas (n), molecular absorption cross-section coefficient σ(i,n), calculate the gas column concentration plot c for each gas profile. gas (i), the calculation formula is as follows: Among them, c gas (x,y,i) represents the gas column concentration plot c. gas (i) Gas concentration value at coordinate (x,y), s m (n) is the spectral feature vector of the gas sample, τ gas (x,y,n) is the transmittance distribution diagram τ gas (n) The transmittance value at pixel coordinates (x, y). c gas (i) Gas column concentration distribution diagram of profile i, where σ(i,n) is the molecular absorption cross-section coefficient, N A It is Avogadro's constant; Based on gas profile mask I GCM (i) Generate a gas concentration map from the gas column concentration distribution map. The method according to claim 1, characterized in that, The foreground comparison image I R Spectral feature matching is performed with a gas spectral feature database to obtain a gas type index map and a gas foreground mask map, specifically including: For multispectral foreground mask I FM Perform union operation to synthesize joint foreground mask I CFM ; Extracting the joint foreground mask I CFM The non-zero pixel coordinates correspond to the foreground contrast image I. R The values of each channel of the pixel coordinates are used as spectral feature vectors; The correlation score I between the spectral feature vector of each pixel and the spectral feature vectors of M gas samples in the gas spectral feature database is calculated sequentially. G (x,y,m) yields the spectral feature matching diagram I for each gas. G (m); All spectral feature matching maps constitute spectral feature matching map set I G ; For each pixel coordinate (x, y), in the gas spectral feature matching atlas I G The algorithm iterates through the data to find the pixel coordinate with the highest relevance score and records it in I. G * (x, y) represents the index value of the gas spectral feature matching map corresponding to the highest correlation score of the pixel coordinates, recorded in I. Type (x,y); the highest correlation score I for all pixel coordinates (x,y). G * (x,y) form I G * All the index values I Type (x,y) Gas Type Index Chart I Type ; to I G * Thresholding is performed to obtain the gas foreground mask image I. GM * . The method according to claim 2, characterized in that, The correlation score I G The calculation method for (x, y, m) is as follows: In the above formula, [I R (x,y,1),I R (x,y,2),...,I R (x,y,n),...,I R [x,y,N)] is the spectral feature vector of pixel coordinates (x,y), s m I is the feature vector of the gas sample. G (x,y,m) represents the spectral feature vector of pixel (x,y) and the gas sample feature vector s. m The correlation score between them isI R The average plot of all spectral channels It is s m The average value, s m (n) is the gas sample feature vector s m The value of the nth spectral channel. The method according to claim 1, characterized in that, This method also includes the following steps: Define morphological feature evaluation indicators and morphological feature vectors for screening gas profiles; the morphological feature evaluation indicators include area, aspect ratio, convex hull area ratio, roundness, edge sharpness, and historical profile overlap rate; The morphological feature evaluation index of the sample gas profile is calculated to obtain the gas sample morphological feature vector. The method according to claim 4, characterized in that, The gas contours are obtained by contour extraction and shape filtering of the gas foreground mask image, and the gas type is determined for each gas contour according to the gas type index map. Type index GasType(i) and gas profile mask I GCM (i), specifically including: For the gas foreground mask image I GM * Perform contour extraction to extract one or more contours; Calculate the morphological feature evaluation indexes for each of the contours; Candidate morphological feature vectors for multiple contours are calculated based on the morphological feature evaluation index of multiple contours. The candidate morphological feature vectors of multiple contours are matched with the sample morphological feature vectors respectively to filter out gas contours that meet the gas characteristics. The gas type index GasType(i) of the gas profile is determined based on the gas type index map, and the gas profile is synthesized into a gas profile mask map I. GCM (i). The method according to claim 5, characterized in that, The gas type index GasType(i) for determining the gas profile based on the gas type index map specifically includes: For each selected contour, the coordinate range of the extracted contour corresponds to the gas type index map I. Type The gas index values of all pixels in the contour are counted, and the gas index value with the largest number of values is selected as the contour gas type index GasType(i) for the entire contour. The method according to claim 1, characterized in that, The generated gas concentration map is then visualized. An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Gas detection recognition and concentration representing method based on hyperspectral infrared image
CN107451590A
Multispectral monitoring method and system
CN111462254A
Remote measurement identification method, system, equipment and device for gas imaging and storage medium
CN115082796A
Multispectral image decorrelation method and system
US20200304732A1
Light source spectrum and multispectral reflectivity image acquisition methods and apparatuses, and electronic device
US20240021021A1