A gas identification and quantification method

By comprehensively utilizing time domain segmentation, spatial domain morphological analysis and spectral domain feature matching methods, the problem that existing gas detection technology is susceptible to environmental factors is solved, and high-precision gas concentration quantification is achieved, which is suitable for industrial safety and environmental protection fields. Long-distance, wide-range gas monitoring.

CN118464826BActive Publication Date: 2024-10-01NANJING UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410913718.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-01
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

Existing gas detection technology is susceptible to environmental factors and has poor stability, making it difficult to achieve high-precision, long-distance, and wide-range quantitative monitoring of gas concentrations. Especially in the fields of industrial safety and environmental protection, there are problems such as short monitoring distance and alarm lag.

Method used

Using a method that comprehensively utilizes time domain segmentation, spatial domain morphological analysis and spectral domain feature matching, multi-channel infrared images are collected through infrared multispectral image detectors, and background subtraction processing, spectral feature matching and morphological screening are performed, combined with the spatial gradient mode distribution map Calculate gas transmittance and concentration, excluding the effects of gas radiation, atmospheric radiation and infrared system bias.

Benefits of technology

It achieves high-precision gas concentration quantification, improves the accuracy and robustness of gas target detection, can effectively cope with gas detection, classification and concentration quantification tasks in complex backgrounds, and provides a relatively complete gas detection and analysis approach.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118464826B_ABST
    Figure CN118464826B_ABST
Patent Text Reader

Abstract

The present invention discloses a gas identification and quantification method, which includes: obtaining an infrared multispectral image of N channels; extracting a multispectral foreground mask and a multispectral background image from the infrared multispectral image; calculating a foreground comparison image; performing spectral feature matching between the foreground comparison image and a gas spectral feature database to obtain a gas type index image and a gas foreground mask image; performing contour extraction and morphological screening on the gas foreground mask image to obtain a gas contour, and calculating a gas type index and a gas contour mask image of each gas contour; respectively calculating a first spatial gradient mode distribution map of the infrared multispectral image and a second spatial gradient mode distribution map of the multispectral background image; calculating a gas permeability distribution map; and calculating a gas column concentration distribution map based on the contour gas type index and the gas permeability distribution map and performing a visual display. The method effectively eliminates the influence of many interfering factors and realizes high-precision gas concentration quantification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of gas concentration detection, in particular to a gas identification and quantification method. Background Art

[0002] Gas detection technology has important applications in the fields of environmental protection and industrial safety. Detecting and repairing small leaks in time through gas detection can help reduce energy waste and greenhouse gas emissions and slow down global warming. Gas detection technology can help timely detect toxic, harmful, flammable and explosive gas leaks in industrial production scenarios, avoid major accidents, and protect human health and property safety. At present, gas detection mainly relies on point sensors, but they are easily affected by wind speed and wind direction, and have limitations such as short monitoring distance and alarm lag. It is of great significance to develop new gas detection technologies with long-distance, wide range and high sensitivity. Optical gas imaging technology, especially non-contact, visual infrared spectroscopy video gas imaging technology, has become one of the important technologies that can meet current needs with its advantages of being able to obtain gas concentration distribution and positioning information. This technology is divided into two types: active detection and passive detection according to the presence or absence of light source. Among them, according to the number of spectral channels of infrared spectral imaging technology, it is divided into infrared single spectrum, multi-spectrum and hyperspectral types. Each technology has its advantages and application scenarios, but the overall application of gas imaging still faces shortcomings and problems such as detection being easily affected by environmental factors, poor stability, difficult to quantify or inaccurate quantification. Summary of the invention

[0003] In view of the above problems in the prior art, the present invention provides a gas identification and quantification method that comprehensively utilizes time domain segmentation, spatial domain morphology analysis and spectral domain feature matching, which effectively eliminates the influence of many interference factors and realizes high-precision gas concentration quantification. It can be applied to remote and high-precision monitoring of toxic and harmful gases in the fields of environmental protection and industrial safety.

[0004] To achieve the above-mentioned purpose, the first aspect of the present application provides a gas identification and quantification method, the method comprising:

[0005] Obtain N-channel infrared multispectral images through infrared multispectral image detector ;

[0006] The infrared multispectral image Perform background subtraction to extract the multispectral foreground mask containing the moving object and a multispectral background image without moving objects ;

[0007] Using multispectral background images and infrared multispectral images Calculate the prospect comparison map ;

[0008] Compare the foreground Match the spectral characteristics with the gas spectral characteristic database to obtain the gas type index map and gas foreground mask ;

[0009] The gas foreground mask image is subjected to contour extraction and morphological screening to obtain a gas contour, and the gas type index of each gas contour is calculated according to the gas type index image. and gas contour mask ;

[0010] Calculate infrared multispectral images separately Infrared multispectral sub-images for each channel The first spatial gradient mode distribution map ;

[0011] Calculate the multispectral background image separately Multispectral background sub-image for each channel The second spatial gradient mode distribution diagram ;

[0012] According to the first spatial gradient mode distribution map and the second spatial gradient mode distribution map Calculated gas permeability distribution diagram ; The calculation formula is as follows:

[0013]

[0014] in, and Represent the horizontal and vertical coordinates of the elements in the figure, Transmittance distribution diagram In pixel coordinates The transmittance value at is the first spatial gradient mode distribution map In pixel coordinates The first gradient value at is the second spatial gradient mode distribution map In pixel coordinates The second gradient value at ;

[0015] Gas type index by profile And gas permeability distribution diagram The gas column concentration distribution diagram is calculated;

[0016] According to the gas contour mask , gas column concentration distribution diagram generates a gas concentration diagram.

[0017] As a possible implementation of the first aspect, the foreground comparison map The spectral features are matched with the gas spectral feature database to obtain the gas type index map and gas foreground mask map, which specifically include:

[0018] Multispectral foreground mask Perform a union operation to synthesize the joint foreground mask ;

[0019] Extracting joint foreground mask The non-zero pixel coordinates correspond to the foreground contrast image. The values ​​of each channel of the pixel coordinates in are taken as the spectral feature vectors;

[0020] Calculate the correlation scores of the spectral feature vector and the spectral feature vectors of the gas samples of M gases in the gas spectral feature database in sequence , get the spectral feature matching map of each gas ; All spectral feature matching graphs constitute the spectral feature matching atlas ;

[0021] For each pixel coordinate , in the gas spectral feature matching atlas Find the highest correlation score of the pixel coordinates in traversal and record it in , and record the index value of the gas spectrum feature matching map corresponding to the highest correlation score of the pixel coordinates in ; All pixel coordinates The highest value of the relevance score composition , all the index values Index chart of gas composition types ;

[0022] right Perform threshold processing to obtain the gas foreground mask map .

[0023] As a possible implementation of the first aspect, the correlation score The calculation method is as follows:

[0024]

[0025] In the above formula, is the pixel coordinate The spectral feature vector of is the gas sample feature vector, Represents pixels The spectral feature vector and the gas sample feature vector The correlation score between yes The average map of all spectral channels of yes The average value of is the gas sample feature vector In the The value of each spectral channel.

[0026] As a possible implementation of the first aspect, the method further includes the steps of:

[0027] Defining morphological feature evaluation indicators and morphological feature vectors for screening gas contours; the morphological feature evaluation indicators include area, aspect ratio, convex hull area ratio, roundness, edge sharpness and historical contour overlap rate;

[0028] The morphological characteristic evaluation index of the sample gas profile is calculated to obtain a gas sample morphological characteristic vector.

[0029] As a possible implementation of the first aspect, the gas foreground mask image is subjected to contour extraction and morphological screening to obtain a gas contour, and a gas type index of each gas contour is determined according to the gas type index image. and gas contour mask , including:

[0030] The gas foreground mask Perform contour extraction to extract one or more contours;

[0031] Calculating morphological feature evaluation indices of a plurality of the contours respectively;

[0032] Calculating a plurality of candidate morphological feature vectors of the contours according to the morphological feature evaluation indicators of the plurality of contours;

[0033] Matching the candidate morphological feature vectors of the plurality of profiles with the sample morphological feature vectors respectively, and screening out gas profiles that meet the gas characteristics;

[0034] Determine the gas type index of the gas profile from the gas type index map , the gas profile is synthesized into a gas profile mask .

[0035] As a possible implementation of the first aspect, the gas type index of the gas profile is determined according to the gas type index map. Specifically include:

[0036] For each filtered contour, the coordinate range of the extracted contour corresponds to the gas type index map 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 of the entire contour. .

[0037] As a possible implementation of the first aspect, the gas type index according to the profile And transmittance distribution diagram The gas column concentration distribution diagram is calculated, including:

[0038] For each profile i, the gas type index is , find the molecular absorption cross-section coefficient of the gas corresponding to the profile from the spectral database ; According to the transmittance distribution diagram , molecular absorption cross section coefficient , calculate the gas column concentration map for each gas profile , the calculation formula is as follows:

[0039]

[0040] in, is the gas column concentration diagram Central coordinates Gas concentration value at the location, is the spectral feature vector of the gas sample, Transmittance distribution diagram In pixel coordinates The transmittance value of the position, Gas column concentration distribution diagram for profile i, is the molecular absorption cross-section coefficient, is Avogadro's constant.

[0041] As a possible implementation manner of the first aspect, the generated gas concentration map is visualized.

[0042] The second aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the program.

[0043] The third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processor.

[0044] Compared with the prior art, the significant advantages of the present invention are as follows: the present invention acquires multi-channel infrared images through infrared multi-spectral image detectors, and independently performs background segmentation, spectral matching and morphological screening on the multi-channel infrared images, and then calculates the gas concentration through the gas inversion model. The gas concentration solution process first proposes a method of using the ratio of the spatial gradient modulus of the infrared multi-spectral image and the multi-spectral background image to calculate the gas transmittance, which effectively eliminates the influence of gas radiation, atmospheric radiation and infrared system bias. The entire algorithm process comprehensively utilizes time, space and spectral information to improve the accuracy and robustness of gas target detection. Through this multi-dimensional analysis, the algorithm can effectively cope with gas detection, classification and concentration quantification tasks under complex backgrounds, providing a relatively complete approach for gas detection and analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The following further illustrates the various features of the present invention and the relationship between the various features with reference to the accompanying drawings. The accompanying drawings are all exemplary, and some features are not shown in actual proportion. Some drawings may omit the features that are conventional in the field involved in the present application and are not necessary for the present application, or additionally show features that are not necessary for the present application. The combination of the various features shown in the accompanying drawings is not intended to limit the present application. In addition, throughout this specification, the same figure numerals refer to the same content. The specific description of the drawings is as follows:

[0046] Figure 1 A flow chart of an embodiment of a gas identification and quantification method provided in an embodiment of the present application.

[0047] Figure 2 A schematic diagram of a flow chart for determining a gas type index and a gas profile mask for each gas profile provided in an embodiment of the present application.

[0048] Figure 3 This is an example of a single channel of the acquired infrared multispectral image.

[0049] Figure 4 An example of a single channel of a multispectral background image.

[0050] Figure 5 This is an example of the first spatial gradient mode distribution diagram.

[0051] Figure 6 This is an example of the second spatial gradient mode distribution diagram.

[0052] Figure 7 An example of a gas permeability distribution diagram is shown in FIG.

[0053] Figure 8 An example of a gas index diagram provided for an embodiment of the present application.

[0054] Fig. 9is the calculated gas column concentration diagram.

[0055] Fig.10 This is an example of an output rendering. DETAILED DESCRIPTION

[0056] The words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0057] In the following description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the previous and next steps can be interchanged, or they can be executed simultaneously.

[0058] The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the features, integers, steps or components mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "a device comprising means A and B" should not be limited to a device consisting of components A and B only.

[0059] References to "one embodiment" or "an embodiment" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present invention. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in one or more embodiments, the particular features, structures, or characteristics can be combined in any appropriate manner, as would be apparent to one of ordinary skill in the art from this disclosure.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present application. In case of any inconsistency, the meaning described in this specification or the meaning derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0061] Figure 1 A flow chart of an embodiment of a gas identification and quantification method provided in an embodiment of the present application. Figure 1 A gas identification and quantification method is shown, comprising:

[0062] Obtain N-channel infrared multispectral images through infrared multispectral image detector ;

[0063] The infrared multispectral image Perform background subtraction to extract the multispectral foreground mask containing the moving object and a multispectral background image without moving objects ;

[0064] Using multispectral background images and infrared multispectral images Calculate the prospect comparison map ;

[0065] Compare the foreground Match the spectral characteristics with the gas spectral characteristic database to obtain the gas type index map and gas foreground mask ;

[0066] The gas foreground mask image is subjected to contour extraction and morphological screening to obtain a gas contour, and the gas type index of each gas contour is calculated according to the gas type index image. and gas contour mask ;

[0067] Calculate infrared multispectral images separately Infrared multispectral subimages for each channel The first spatial gradient mode distribution map ;

[0068] Calculate the multispectral background image separately Multispectral background sub-image for each channel The second spatial gradient mode ;

[0069] According to the first spatial gradient mode distribution map and the second spatial gradient mode distribution map Calculated gas permeability distribution diagram ; The calculation formula is as follows:

[0070]

[0071] in, and Represent the horizontal and vertical coordinates of the elements in the figure, Transmittance distribution diagram In pixel coordinates The transmittance value at is the first spatial gradient mode distribution map In pixel coordinates The first gradient value at is the second spatial gradient mode distribution map In pixel coordinates The second gradient value at ;

[0072] Gas type index by profile And gas permeability distribution diagram The gas column concentration distribution diagram is calculated;

[0073] According to the gas contour mask , gas column concentration distribution diagram to generate a gas concentration diagram and display it visually.

[0074] This application collects multi-channel infrared images through an infrared multi-spectral image detector, and calculates the gas concentration through a gas inversion model after background segmentation, spectral feature matching and morphological screening of the infrared images. The entire algorithm process comprehensively utilizes time, space, and spectral information to improve the accuracy and robustness of gas target detection. In particular, in terms of gas concentration quantification, a method of calculating transmittance using the ratio of the gradient modulus of the infrared multi-spectral image and the multi-spectral background image is proposed to eliminate interference from gas temperature, atmospheric radiation, additive noise, and system bias. Through the above multi-dimensional analysis, the algorithm can effectively cope with gas detection tasks under complex backgrounds, providing a relatively complete approach for gas detection, classification, and concentration quantification.

[0075] Specifically, for the step, an infrared multispectral image of N channels is obtained by using an infrared multispectral image detector. The present application uses infrared multi-spectral image detectors including but not limited to multiple infrared cameras equipped with narrow-band filters of different wavelengths to collect infrared images. The passbands of the narrow-band filters of each channel are different to obtain responses of different spectral bands. The present application also performs basic correction and preprocessing on the infrared image. The single channel of the collected infrared multi-spectral image is as follows: Figure 3 As shown, a single channel of the multispectral background image is Figure 4 shown.

[0076] Specifically, for the step of The main purpose of background subtraction is to accurately and quickly identify and segment the multispectral foreground mask containing the moving object from the collected multispectral infrared multispectral image. and a multispectral background image without moving objects , the specific deduction process is as follows:

[0077] Use N background subtractors to calculate N input infrared multispectral images. Process and output the processed multispectral background image and multispectral foreground mask .

[0078]

[0079]

[0080] Among them, the multispectral background image and multispectral foreground mask There are N channels.

[0081] Specifically, using multispectral background images and infrared multispectral images Calculate the prospect comparison map , the specific calculation method is as follows:

[0082]

[0083] in, With N channels, It is the foreground comparison map of the nth channel.

[0084] This application uses multiple background subtraction algorithms to analyze the temporal changes between video frames in each channel, identify and separate the flowing gas pixels. Background subtraction mainly separates the foreground and background images of the spectral channel by dynamically modeling the background of the input spectral channel. Among them, the background subtraction algorithm can directly use mature methods, such as Mixture of Gaussians (MOG), Visual Background Extractor (ViBe), Codebook Model, etc.

[0085] In a further preferred embodiment, the present application also includes global motion detection. Calculate the time domain difference map, take the maximum difference value, calculate the average value, and determine whether there is significant movement based on the set threshold. In this way, infrared multispectral images can be identified. The intensity and existence of global motion in .

[0086]

[0087]

[0088] The detailed steps are as follows:

[0089] Input: Receive the image sequence of the current frame and the previous frame, and determine the motion judgment threshold.

[0090] Calculate the time domain difference: For each pair of current frame and previous frame images, calculate their difference images and take the absolute value to obtain the time domain difference map.

[0091] Calculate the maximum difference map: take the maximum value of all difference images to get the maximum difference map.

[0092] Calculate the average of the maximum difference map: Calculate the average of the maximum difference map , as a measure of global motion intensity.

[0093] Determine whether there is significant global motion: Compared with the threshold threshold, if If it is greater than the threshold, it is considered that there is significant global motion.

[0094] The present application extracts the maximum time-domain difference map of the infrared multispectral image to identify whether the scene has global motion, thereby resetting the background subtraction, thereby solving the problem of background subtraction model failure caused by large scene motion.

[0095] Specifically, compare the prospect Match the spectral characteristics with the gas spectral characteristic database to obtain the gas type index map and gas foreground mask .

[0096] (1) Gas spectral feature database. The gas spectral feature database stores the spectral feature data of various gas samples generated by simulation.

[0097] The simulation generation method of the gas spectrum feature database is as follows:

[0098] The specific temperature is calculated by combining the background Planck radiation spectrum curve, gas spectrum transmittance curve, optical system spectrum transmittance curve and detector spectrum response curve. The system response value of each gas in each band at the temperature determined by the application scenario. In a specific band The spectral characteristic values ​​under The calculation formula is as follows:

[0099]

[0100] In the above formula is the channel number, m is the gas index number, is the filter spectral response curve, is the system response curve, is the gas permeability curve, is the background temperature, Background temperature The emissivity under (calculated by Planck's blackbody radiation law), is the wavelength, and is the spectral range of the nth channel.

[0101] Assuming there are N bands and M types of gases, the detection rate curves of all sample gases form the foreground spectrum feature library matrix, which is expressed as follows:

[0102]

[0103] In the above formula, is the characteristic value of the Nth band of the Mth gas. For convenience, we use represents the gas sample feature vector of the mth gas, that is, .

[0104] (2) Spectral feature matching

[0105] Multispectral foreground mask Perform a union operation to synthesize the joint foreground mask ;

[0106] Extracting joint foreground mask The non-zero pixel coordinates correspond to the foreground contrast image. The values ​​of each channel of the pixel coordinates in are taken as the spectral feature vectors;

[0107] Calculate the correlation score between the spectral feature vector of each coordinate and the spectral feature vector of the gas sample in turn , get the spectral feature matching map of each gas All spectral feature matching graphs constitute the spectral feature matching atlas .

[0108] Relevance score The Pearson correlation coefficient (PCC) can be used for calculation, and the calculation formula is as follows:

[0109]

[0110] In the above formula, is the pixel coordinate The spectral feature vector of is the gas sample feature vector, Represents pixels The spectral feature vector and the gas sample feature vector The correlation score between yes The average map of all spectral channels of yes The average value of is the gas sample feature vector In the The value of each spectral channel.

[0111] (3) Best match determination

[0112] For each pixel coordinate , in the gas spectral feature matching atlas Find the highest correlation score of the pixel coordinates in traversal and record it in , and record the index value of the gas spectrum feature matching map corresponding to the highest correlation score of the pixel coordinates in ; All pixel coordinates The highest value of the relevance score composition , all the index values Index chart of gas composition types .

[0113] The index value calculation formula is expressed as follows:

[0114]

[0115] Gas index diagram example Figure 8 shown.

[0116] Specifically, yes Perform threshold processing to obtain the gas foreground mask map .

[0117] (4) Gas foreground mask synthesis

[0118] Setting the Threshold , to determine whether the pixel belongs to the foreground of the target gas.

[0119]

[0120] After the above calculations, all Composition gas foreground mask .

[0121] In the present application, the gas foreground mask generation process takes into account the diffusion movement characteristics of the gas and the spectral absorption characteristics of the specific gas. At the same time, the best matching gas is selected in the above process to realize the gas type identification function.

[0122] Specifically, before performing the above steps, the present application also includes:

[0123] Defining morphological feature evaluation indicators and morphological feature vectors for screening out gas contours; the morphological feature evaluation indicators include area, aspect ratio, convex hull area ratio, roundness and edge sharpness;

[0124] Specifically, the detailed steps are as follows:

[0125] According to the gas diffusion distribution characteristics, six morphological feature evaluation indices including area, aspect ratio, convex hull area ratio, roundness, edge sharpness and historical profile overlap rate were defined. According to the six morphological feature evaluation indices, the morphological feature vector F was defined.

[0126] The morphological feature evaluation indicators that can be used to screen out gas profiles are defined as follows:

[0127] a) Area (A). The area metric is used to quantify the total number of pixels within the object outline and can be calculated by directly counting the number of pixels within the image outline.

[0128] b) Aspect ratio (AR). The aspect ratio is the ratio of the width to the height of the bounding rectangle of an object, and is used to describe the extent of the object. It is obtained by calculating the ratio of the width to the height of the minimum bounding rectangle that encloses the contour, that is, aspect ratio = width / height.

[0129] c) Convexity. The convexity is the ratio of the contour area to the convex hull area of ​​the object. The convex hull is the smallest convex shape that contains the contour. The calculation steps are as follows: ① First calculate the convex hull of the contour. ② Calculate the contour area and the convex hull area. ③ Convexity = contour area / convex hull area.

[0130] d) Roundness. Roundness describes the degree to which an object's shape is close to a circle. The roundness of an ideal circle is 1. Calculation method: .

[0131] e) Edge Sharpness. Edge sharpness quantifies the clarity or obviousness of the edge of the contour. Calculation method: It is evaluated by calculating the intensity of the edge pixel gradient, usually using the Sobel operator or Canny edge detector to determine the edge strength.

[0132] f) History Overlap Ratio. Compare the overlap between the current contour and the historically stored contour set. The calculation method is as follows: ① Calculate the intersection area of ​​the two contours. ② Overlap = intersection area / contour A area + contour B area - intersection area.

[0133] Based on the morphological feature evaluation index defined above, the morphological feature vector It can be constructed as a vector containing all these quantitative indicators.

[0134]

[0135] The morphological feature evaluation index of the sample gas profile is calculated according to the above calculation method to obtain the gas sample morphological feature vector F0. The gas sample morphological feature vector F0 is used to match with the candidate feature vector in the subsequent morphological screening step.

[0136] like Figure 2 As shown, for the step of determining the gas type index of each gas profile according to the gas type index map and gas contour mask Specifically include:

[0137] The gas foreground mask Perform contour extraction to extract one or more contours;

[0138] Calculating morphological feature evaluation indices of a plurality of the contours respectively;

[0139] Calculating a plurality of candidate morphological feature vectors of the contours according to the morphological feature evaluation indicators of the plurality of contours;

[0140] Matching the candidate morphological feature vectors of the plurality of profiles with the sample morphological feature vectors respectively, and screening out gas profiles that meet the gas characteristics;

[0141] Determine the gas type index of the gas profile from the gas type index map , the gas profile is synthesized into a gas profile mask Specifically, for each selected contour, the coordinate range of the extracted contour corresponds to the gas type index map 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 of the entire contour. .

[0142] This application extracts contours and screens the gas foreground mask image to obtain contours that meet the gas characteristics and generate a gas contour mask image. , and get the gas type index for each profile , and obtain the corresponding gas type of each contour. In this application, the temporal and spatial characteristics of the contour are comprehensively considered. According to 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 area, screen out the area most likely to represent the target gas, and output the gas area mask image.

[0143] Specifically, the actual concentration of the gas is calculated based on the gas area mask image. The calculation method is as follows:

[0144] (1) Spatial gradient modulus calculation. Calculate the infrared multispectral image separately Infrared multispectral subimages for each channel The first spatial gradient mode distribution map ,like Figure 5 As shown;

[0145] Calculate the multispectral background image separately Multispectral background sub-image for each channel The second spatial gradient mode distribution diagram ,like Figure 6 As shown;

[0146] Where n is the spectral channel number.

[0147] (2) Transmittance distribution map calculation. According to the first spatial gradient mode distribution map and the second spatial gradient mode distribution map Calculated gas permeability distribution diagram ; The calculation formula is as follows:

[0148]

[0149] in, and Represent the horizontal and vertical coordinates of the elements in the figure, Transmittance distribution diagram In pixel coordinates The transmittance value at is the first spatial gradient mode distribution map In pixel coordinates The first gradient value at is the second spatial gradient mode distribution map In pixel coordinates The calculated gas permeability distribution diagram is as follows: Figure 7 shown.

[0150] (3) Calculation of gas concentration.

[0151] a. Determine the molecular absorption cross section. For each profile after morphological screening, find the molecular absorption cross section coefficient corresponding to the gas from the database according to the gas type of the profile. , where n corresponds to the spectral channel.

[0152] b. Concentration calculation. For each profile i, according to the profile gas type index , find the molecular absorption cross-section coefficient of the gas corresponding to the profile from the spectral database ; According to the transmittance distribution diagram , molecular absorption cross section coefficient , calculate the gas column concentration map for each gas profile , the calculation formula is as follows:

[0153]

[0154] Where i is the contour index, The gas column concentration diagram Central coordinates Gas concentration value at the location, is the spectral feature vector of the gas sample, Transmittance distribution diagram In pixel coordinates The transmittance value of the position, Gas column concentration distribution diagram for profile i, is the molecular absorption cross-section coefficient, is Avogadro's constant. The calculated gas column concentration diagram is shown in Fig. 9 shown.

[0155] The gas concentration corresponding to each gas profile can be calculated through the above formula, and the gas column concentration distribution diagram corresponding to each gas profile can be recorded. .

[0156] The advantage of the above-mentioned gas concentration quantitative calculation model is that the use of spatial gradient eliminates the influence of gas radiation, atmospheric radiation and infrared system bias.

[0157] The present application utilizes the above-mentioned spatial gradient method to effectively eliminate the influence of gas radiation, atmospheric radiation and infrared system bias.

[0158] Specifically, in order to further improve the inversion accuracy, the present application also includes further filtering of the gas concentration map. Further processing is performed by comprehensively utilizing the correlation of spatial neighborhood pixels combined with optimization theory. In order to minimize the difference between the observed values ​​of all neighborhood pixels and the model predicted values, and at the same time utilizing the continuity of neighborhood concentration, a regularization term of spatial continuity is added to the objective function:

[0159]

[0160] in, is the traversed image coordinate value, W is the image width, H is the image height, In pixel coordinates The concentration observation at the location, is the pixel coordinate The concentration estimate at the location, Indicates the neighborhood coordinate offset range; is a regularization parameter that controls the strength of neighborhood continuity. In the above formula, the regularization term Enforcing spatially adjacent pixels to have similar gas concentrations helps suppress concentration fluctuations in the image due to noise or discontinuous sampling.

[0161] In order to intuitively mark the area and concentration of gas in the output image for user convenience, the present application maps the gas concentration map into a color map and superimposes the color map onto the infrared image for visual display.

[0162] Specifically, a suitable visualization scheme is selected according to the specific application to display the gas contour mask, gas type and gas concentration of each contour. The collected infrared multispectral images are superimposed, and different colors are set according to the gas type corresponding to each contour, and the corresponding gas concentration is Displayed around the outline. Rendering example Fig.10 shown.

[0163] The present invention performs analysis and processing in time, space and spectrum space respectively, which improves the accuracy and robustness of gas identification and segmentation. The transmittance distribution map is calculated by using the spatial gradient of the infrared multi-spectral map and the multi-spectral background map, which effectively eliminates the influence of the environment and system bias and can achieve high-precision gas concentration estimation.

[0164] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0165] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present application is described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present invention, all of which belong to the protection scope of the present invention.

Claims

1. A gas identification and quantification method, characterized in that: The method comprises: Obtain N-channel infrared multispectral images through infrared multispectral image detector ; The infrared multispectral image Perform background subtraction to extract the multispectral foreground mask containing the moving object and a multispectral background image without moving objects ; Using multispectral background images and infrared multispectral images Calculate the prospect comparison map ; Compare the foreground Match the spectral characteristics with the gas spectral characteristic database to obtain the gas type index map and gas foreground mask ; The gas foreground mask image is subjected to contour extraction and morphological screening to obtain a gas contour, and the gas type index of each gas contour is calculated according to the gas type index image. and gas contour mask ; Calculate infrared multispectral images separately Infrared multispectral sub-images for each channel The first spatial gradient mode distribution map ; Calculate the multispectral background image separately Multispectral background sub-image for each channel The second spatial gradient mode distribution map ; According to the first spatial gradient mode distribution map and the second spatial gradient mode distribution map Calculated gas permeability distribution diagram ; The calculation formula is as follows: ; in, and are the horizontal and vertical axes of the graph, Transmittance distribution diagram In pixel coordinates The transmittance value of the position, is the first spatial gradient mode distribution map In pixel coordinates The first gradient value at is the second spatial gradient mode distribution map In pixel coordinates The second gradient value at ; Gas type index by profile And gas permeability distribution diagram The gas column concentration distribution diagram is calculated, including: For each profile i, the gas type index is , find the molecular absorption cross-section coefficient of the gas corresponding to the profile from the spectral database ; According to the transmittance distribution diagram , molecular absorption cross section coefficient , calculate the gas column concentration map for each gas profile , the calculation formula is as follows: ; in, The gas column concentration diagram Central coordinates Gas concentration value at the location, is the spectral feature vector of the gas sample, Transmittance distribution diagram In pixel coordinates The transmittance value of the position, Gas column concentration distribution diagram for profile i, is the molecular absorption cross-section coefficient, is Avogadro's constant; According to the gas contour mask , gas column concentration distribution diagram generates a gas concentration diagram.

2. The method according to claim 1, characterized in that The prospect comparison chart The spectral features are matched with the gas spectral feature database to obtain the gas type index map and gas foreground mask map, which specifically include: Multispectral foreground mask Perform a union operation to synthesize the joint foreground mask ; Extracting joint foreground mask The non-zero pixel coordinates correspond to the foreground contrast image. The values ​​of each channel of the pixel coordinates in are taken as the spectral feature vectors; Calculate the correlation score between the spectral feature vector of each pixel and the spectral feature vector of the gas samples of M gases in the gas spectral feature database in turn , get the spectral feature matching map of each gas ; All spectral feature matching graphs constitute the spectral feature matching atlas ; For each pixel coordinate , in the gas spectral feature matching atlas Find the highest correlation score of the pixel coordinates in traversal and record it in , and record the index value of the gas spectrum feature matching map corresponding to the highest correlation score of the pixel coordinates in ; All pixel coordinates The highest value of the relevance score composition , all the index values Index chart of gas composition types ; right Perform threshold processing to obtain the gas foreground mask map .

3. The method according to claim 2, characterized in that The relevance score The calculation method is as follows: ; In the above formula, is the pixel coordinate The spectral feature vector of is the gas sample feature vector, Represents pixels The spectral feature vector and the gas sample feature vector The correlation score between yes The average map of all spectral channels of yes The average value of is the gas sample feature vector In the The value of each spectral channel.

4. The method according to claim 1, characterized in that The method also includes the steps of: Defining morphological feature evaluation indicators and morphological feature vectors for screening gas contours; the morphological feature evaluation indicators include area, aspect ratio, convex hull area ratio, roundness, edge sharpness and historical contour overlap rate; The morphological characteristic evaluation index of the sample gas profile is calculated to obtain a gas sample morphological characteristic vector.

5. The method according to claim 4, characterized in that The gas foreground mask image is subjected to contour extraction and morphological screening to obtain a gas contour, and the gas type index of each gas contour is determined according to the gas type index image. and gas contour mask , specifically including: The gas foreground mask Perform contour extraction to extract one or more contours; Calculating morphological feature evaluation indices of a plurality of the contours respectively; Calculating a plurality of candidate morphological feature vectors of the contours according to the morphological feature evaluation indicators of the plurality of contours; Matching the candidate morphological feature vectors of the plurality of profiles with the sample morphological feature vectors respectively, and screening out gas profiles that meet the gas characteristics; Determine the gas type index of the gas profile from the gas type index map , the gas profile is synthesized into a gas profile mask .

6. The method according to claim 5, characterized in that The gas type index of the gas profile is determined according to the gas type index map. , specifically including: For each filtered contour, the coordinate range of the extracted contour corresponds to the gas type index map 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 of the entire contour. .

7. The method according to claim 1, characterized in that Visualize the generated gas concentration map.

8. An electronic device comprising 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, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Gas detection recognition and concentration representing method based on hyperspectral infrared image

    CN107451590A

  • Chemical gas leakage detection method and system based on spectrum video

    CN113688801A

  • High-spatial-resolution satellite load methane column concentration remote sensing inversion method and system

    CN116804621A

  • Regional soil moisture content monitoring method based on remote sensing data

    CN117169138A

  • Bacteria classification method and bacteria classification device

    JP2024037531A