CN116543022A - Gas infrared image processing method, gas leak detector and storage medium - Google Patents

Gas infrared image processing method, gas leak detector and storage medium Download PDF

Info

Publication number
CN116543022A
CN116543022A CN202310533195.5A CN202310533195A CN116543022A CN 116543022 A CN116543022 A CN 116543022A CN 202310533195 A CN202310533195 A CN 202310533195A CN 116543022 A CN116543022 A CN 116543022A
Authority
CN
China
Prior art keywords
image
current frame
gas
images
infrared
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310533195.5A
Other languages
Chinese (zh)
Inventor
李红领
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Iray Technology Co Ltd
Original Assignee
Iray Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Iray Technology Co Ltd filed Critical Iray Technology Co Ltd
Priority to CN202310533195.5A priority Critical patent/CN116543022A/en
Publication of CN116543022A publication Critical patent/CN116543022A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/254Analysis of motion involving subtraction of images
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M3/00Investigating fluid-tightness of structures
    • G01M3/02Investigating fluid-tightness of structures by using fluid or vacuum
    • G01M3/04Investigating fluid-tightness of structures by using fluid or vacuum by detecting the presence of fluid at the leakage point
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The application provides a gas infrared image processing method, a gas leak detector and a storage medium, wherein the method comprises the following steps: acquiring a current frame image of a target scene containing a region to be detected and a continuous multi-frame image associated with the current frame image; dividing according to the time attribute of the continuous multi-frame images to obtain a first image group comprising at least two frames of images and a second image group comprising at least two frames of images, respectively performing time domain filtering based on the first image group and the second image group to obtain a background image and a foreground image, and determining a differential image containing gas information in a target scene according to the foreground image and the background image; carrying out detail extraction according to the current frame image to obtain a current frame detail image, and carrying out image enhancement processing to obtain a current frame enhancement image; and carrying out image fusion on the basis of the differential image, the current frame detail image and the current frame enhanced image to obtain a fused gas infrared image.

Description

Gas infrared image processing method, gas leak detector and storage medium
Technical Field
The present application relates to image processing technology, and more particularly, to a gas infrared image processing method, a gas leak detector, and a computer readable storage medium.
Background
The leakage of most industrial gases is not visible to the naked eye, but because most gases have some absorption of infrared radiation of a specific wavelength, the gas region appears as a low gray scale in the infrared image compared to the non-gas region. Thermal infrared imagers are therefore increasingly being used in the field of gas leak detection. The early gas leakage detection thermal imager is an active thermal imager, and an infrared emission device is used for absorbing and imaging background scattered infrared rays, and a region with gas is represented as a low-gray image characteristic in an image, wherein the infrared emission device emits infrared rays to a scene, so that the contrast ratio of the gas and the background is enhanced. However, such active thermal imagers are ineffective for low reflection scenes, such as the sky. Second, the infrared emitting device may be harmful to the human eye and the infrared emitting equipment may increase the cost of the thermal imager.
With the improvement of infrared focal plane array performance, the passive infrared gas leak detectors increasingly exhibit their advantages. In a passive infrared gas leak detector, in order to enhance the contrast of gas, an optical filter is often used to limit the infrared radiation received by the thermal infrared imager to the vicinity of the peak of the infrared absorption wavelength of the detected gas, and the optical filter is arranged between a lens and a focal plane. At the same time, however, the detector signal-to-noise ratio will be somewhat lower, ultimately leading to a noisy infrared image and blurred images.
Therefore, the currently known active thermal imager or passive infrared gas leak detector has the characteristics of blurred edge contour, weak central texture, translucence and the like in the morphological expression of gas in an infrared image, and a general image enhancement algorithm hardly plays a positive and effective role.
Disclosure of Invention
In order to solve the existing technical problems, the application provides a gas infrared image processing method and device capable of clearly and effectively highlighting gas forms and a computer readable storage medium.
In order to achieve the above purpose, the technical solution of the embodiments of the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a gas infrared image processing method, including:
acquiring a current frame image of a target scene containing a region to be detected and a continuous multi-frame image associated with the current frame image;
dividing according to the time attribute of the continuous multi-frame images to obtain a first image group comprising at least two frames of images and a second image group comprising at least two frames of images, respectively performing time domain filtering on the basis of the first image group and the second image group to obtain a background image and a foreground image, and determining a differential image containing gas information in the target scene according to the foreground image and the background image;
Extracting details according to the current frame image to obtain a current frame detail image, and performing image enhancement processing to obtain a current frame enhancement image;
and carrying out image fusion on the basis of the differential image, the current frame detail image and the current frame enhanced image to obtain a fused gas infrared image.
In a second aspect, embodiments of the present application provide a gas leak detector comprising a memory and a processor; the memory stores a computer program that, when executed by the processor, causes the processor to perform the gas infrared image processing method of any of the embodiments of the present application.
In a third aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, where the computer program when executed by a processor causes the processor to perform a gas infrared image processing method according to any embodiment of the present application.
In the above embodiment, the continuous multi-frame images are utilized to divide a first image group and a second image group which respectively include at least two frames of images, the multi-frame images in the first image group and the second image group are respectively filtered in a time domain to obtain a background image and a foreground image, and a difference image containing gas information in a target scene is obtained according to the background image and the foreground image; extracting details according to the current frame image to obtain a current frame detail image and performing image enhancement processing to obtain a current frame enhancement image, and fusing the difference image, the current frame detail image and the current frame enhancement image to obtain a final gas infrared image; therefore, the gas effect in the gas infrared image obtained after fusion can be highlighted through the differential image containing the gas information in the target scene, the gas region edge information in the gas infrared image obtained after fusion can be highlighted through the detail image of the current frame, and the temperature information contrast effect in the scene in the gas infrared image obtained after fusion can be highlighted through the enhanced image of the current frame, so that the purpose of clearly and effectively highlighting the gas form in the finally obtained gas infrared image is achieved.
In the above embodiments, the gas infrared image processing device and the computer readable storage medium respectively belong to the same concept as the corresponding gas infrared image processing method embodiments, so that the gas infrared image processing device and the computer readable storage medium respectively have the same technical effects as the corresponding gas infrared image processing method embodiments, and are not described herein.
Drawings
FIG. 1 is a schematic diagram of an alternative application scenario of a gas infrared image processing method according to an embodiment;
FIG. 2 is a schematic diagram of an alternative application scenario of a gas infrared image processing method according to another embodiment;
FIG. 3 is a flow chart of a gas infrared image processing method according to an embodiment;
FIG. 4 is a flow chart of a method of processing gas infrared images in an alternative embodiment;
FIG. 5 is a logic block diagram corresponding to the gas infrared image processing method shown in FIG. 4;
FIG. 6 is a schematic diagram of a gas infrared image processing apparatus according to an embodiment;
fig. 7 is a schematic diagram of a gas leak detector in an embodiment.
Detailed Description
The technical scheme of the application is further elaborated below by referring to the drawings in the specification and the specific embodiments.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to the expression "some embodiments" which describe a subset of all possible embodiments, it being noted that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
In the following description, the terms "first, second, third" and the like are used merely to distinguish between similar objects and do not represent a specific ordering of the objects, it being understood that the "first, second, third" may be interchanged with a specific order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
Referring to fig. 1, a schematic diagram of an optional application scenario of a gas infrared image processing method according to an embodiment of the present application is shown, where the gas infrared image processing method is applied to a gas leakage detection thermal imager 11 for detecting leakage of industrial gas. The gas leakage detection thermal imager 11 is configured to acquire an infrared image of a target scene where gas leakage may exist in real time, and by executing the gas infrared image processing method provided by the embodiment of the present application, a processed gas infrared image capable of clearly and effectively highlighting a gas form is obtained, so that it is convenient to observe the gas infrared image to determine whether gas leakage exists in the target scene, and if gas leakage exists, it is convenient to determine the degree of gas leakage according to gas information in the gas infrared image.
Optionally, referring to fig. 2, a schematic diagram of an optional application scenario of a gas infrared image processing method provided in another embodiment of the present application is shown, where a gas leakage detection thermal imager 11 is in communication connection with an infrared imaging device 12, the infrared imaging device 12 is configured to collect an infrared image of a target scenario where gas leakage may exist in real time and send the infrared image to the gas leakage detection thermal imager 11, and the gas leakage detection thermal imager 11 performs the gas infrared image processing method provided in the embodiment of the present application according to the received infrared image, so as to obtain a processed gas infrared image capable of clearly and effectively highlighting a gas form, so as to facilitate observation of the gas infrared image to determine whether gas leakage exists in the target scenario, and if the gas leakage exists, facilitate determination of a degree of gas leakage according to gas information in the gas infrared image.
Referring to fig. 3, a gas infrared image processing method according to an embodiment of the present application may be applied to the gas leak detection thermal imager shown in fig. 1 or fig. 2. The gas infrared image processing method comprises the following steps:
s101, acquiring a current frame image of a target scene containing a region to be detected and a continuous multi-frame image associated with the current frame image.
The region to be measured is a region for judging whether or not a gas is present. The target scene is a scene containing the region to be detected. For example, for a factory floor that may need to rely on industrial gases to perform production, the factory floor may be a target scenario; depending on the location of the industrial gas storage devices within the plant, if there is an industrial gas leak, it is common for the industrial gas storage devices to first appear around them, so that the area where these industrial gas storage devices are located is accordingly the area to be measured. The current frame image refers to an image selected to be processed to determine whether gas exists in an imaging area corresponding to the area to be measured. The successive multi-frame images associated with the current frame image refer to images selected for use in determining the background image and the foreground image to which the current frame image corresponds.
In one alternative example, the consecutive multi-frame images associated with the current frame image are a specified number of multi-frame images acquired before the current frame image that are adjacent to and consecutive to the current frame image. For example, for a target scene, images can be continuously acquired within a certain period of time, when n frames of images are continuously acquired, the n frame of images are taken as current frame images, and the 1 st to n-1 st frames of images acquired before are taken as continuous multi-frame images associated with the current frame images; or, it may be that images are continuously acquired for a target scene for a certain period of time, when n frames of images are continuously acquired, then the acquired image (i.e., the n+1st frame of image) is taken as the current frame of image, and the n frames of images acquired previously are taken as continuous multi-frame images associated with the current frame of image.
S103, dividing according to the time attribute of the continuous multi-frame images to obtain a first image group comprising at least two frames of images and a second image group comprising at least two frames of images, respectively performing time domain filtering on the basis of the first image group and the second image group to obtain a background image and a foreground image, and determining a differential image containing gas information in the target scene according to the foreground image and the background image.
The continuous multi-frame images are divided into a first image group and a second image group according to the time attribute, and the first image group and the second image group respectively comprise at least two frames of images. The time attribute of the image may refer to a sequence of image acquisition time, a time sequence relationship between multiple frames of images based on content, and the like. In this embodiment, the images are divided into two groups according to the time sequence of the image acquisition time of the continuous multi-frame images, wherein each group contains more than 1 frame of images, and one group of images is used for filtering image noise through time domain filtering and improving image definition and is used as a background image of the current frame of images; the other group of images are used for filtering image noise through time domain filtering and improving image definition, and serve as foreground images of the current frame of images, each group of images respectively comprises at least two continuous frames of images with different acquisition time points, if gas leakage exists in a region to be detected of a target scene, imaging differences of gas regions exist between the different frames of images based on gas flow characteristics, a background image obtained through time domain filtering based on the continuous multiple frames of images and a foreground image obtained through time domain filtering based on the continuous multiple frames of images are utilized to determine differential images containing gas information in the target scene, and therefore image information contained in the continuous multiple frames of images related to the current frame of images can be utilized to participate in subsequent image fusion together, so that more image information capable of accurately representing the gas information in the target scene is obtained.
S105, extracting details according to the current frame image to obtain a current frame detail image, and performing image enhancement processing to obtain a current frame enhancement image.
Details in the image refer to image features in the image, such as isolated points, lines, abrupt image changes and the like in the image, which can relatively highlight gray level change conditions. The detail extraction is carried out on the current frame image to obtain the current frame detail image, so that the edge information in the target scene can be better contained. The current frame image is subjected to image enhancement processing to obtain the current frame enhanced image, so that the gray scale interval of the image is pulled apart or gray scale distribution is uniform, contrast is increased, and image space enhancement is realized.
And S107, performing image fusion based on the differential image, the current frame detail image and the current frame enhanced image to obtain a fused gas infrared image.
The obtained differential image, the current frame detail image and the current frame enhanced image are subjected to image fusion, so that effective image information in the differential image, the current frame detail image and the current frame enhanced image can be simultaneously reserved in the fused gas infrared image, and particularly, a large amount of image information which is obtained by processing continuous multi-frame images and can accurately represent gas information in a target scene in the differential image, edge information in a scene contained in the current frame detail image and temperature information with stronger contrast contained in the current frame enhanced image are reserved.
In the above embodiment, the continuous multi-frame images are utilized to divide a first image group and a second image group which respectively include at least two frames of images, the multi-frame images in the first image group and the second image group are respectively filtered in a time domain to obtain a background image and a foreground image, and a difference image containing gas information in a target scene is obtained according to the background image and the foreground image; extracting details according to the current frame image to obtain a current frame detail image and performing image enhancement processing to obtain a current frame enhancement image, and fusing the difference image, the current frame detail image and the current frame enhancement image to obtain a final gas infrared image; therefore, the gas effect in the gas infrared image obtained after fusion can be highlighted through the differential image containing the gas information in the target scene, the gas region edge information in the gas infrared image obtained after fusion can be highlighted through the detail image of the current frame, and the temperature information contrast effect in the scene in the gas infrared image obtained after fusion can be highlighted through the enhanced image of the current frame, so that the purpose of clearly and effectively highlighting the gas form in the finally obtained gas infrared image is achieved.
In some embodiments, in S103, determining a differential image containing gas information in the target scene from the foreground image and the background image includes:
Performing difference calculation on the foreground image and the background image to obtain an initial difference image;
performing gas enhancement processing on the initial differential image to obtain a differential image containing gas information in the target scene; the gas enhancement processing comprises threshold processing, histogram equalization processing and linear mapping processing in sequence.
Firstly, making a difference between a foreground image and a background image, and respectively and correspondingly subtracting the difference of gray values of the pixels in the foreground image in the corresponding background image according to the gray values of the pixels in the foreground image to obtain an initial differential image; performing gas enhancement processing on the initial differential image, including sequentially performing threshold processing, histogram equalization processing and linear mapping processing, wherein the threshold processing is performed on the initial differential image, so that abnormal maximum values and minimum values of the initial differential image, which occur at the edge positions due to rapid change of gray values, can be removed; the histogram equalization processing can play roles in enhancing contrast and reducing image noise on the initial differential image after the abnormal value is removed; the linear mapping process can adjust that the pixel point with the gray value of 0 before processing in the initial differential image after histogram equalization process is still 0 after processing, and the difference value of the gray value of the pixel point can be positive or negative due to the floating of the gas at the image imaging part corresponding to the region with the gas, and the gray value of the pixel point is mapped and transformed to a certain degree, so that the finally obtained differential image can be brighter in the bright position and darker in the dark position, thereby achieving the purpose of highlighting the gas effect.
In the above embodiment, the final differential image is obtained by performing difference calculation on the foreground image and the background image, and sequentially performing gas enhancement processing such as thresholding, histogram equalization processing, and linear mapping processing, so that on one hand, in the foreground image and the background image obtained by using continuous multi-frame images, the difference result of the foreground image and the background image may include more image feature information capable of identifying whether gas information exists in the target scene, and on the other hand, sequential combination of thresholding, histogram equalization processing, and linear mapping processing may effectively identify the morphological change formed in the image due to the gas floating characteristic, so that the gas information in the target scene may be accurately retained in the differential image, thereby achieving the purpose of highlighting the gas effect.
Optionally, in S103, dividing according to a time attribute of the continuous multi-frame image to obtain a first image group including at least two frames of images and a second image group including at least two frames of images, and performing temporal filtering based on the first image group and the second image group to obtain a background image and a foreground image respectively, including:
dividing the multi-frame images with the previous acquisition time into a first image group and dividing the multi-frame images with the subsequent acquisition time into a second image group according to the time attribute of the continuous multi-frame images;
Performing time domain filtering on the first image group to obtain a background image;
performing time domain filtering on the second image group to obtain a foreground image;
wherein the time domain filtering may be selected from one of: mean filtering and Gaussian filtering.
The first image group and the second image group respectively comprise at least two frames of images, and it is known that the continuous multi-frame image associated with the current frame of image should comprise at least four frames of images. In this embodiment, the number of image frames included in the first image group and the second image group is equal, the number of continuous multi-frame images associated with the current frame image is eight, the first four-frame image is divided into the first image group according to the time sequence, and the second four-frame image is divided into the second image group. The time domain filtering refers to performing convolution operation based on a spatial image matrix to filter out image noise and enhance image definition. In this embodiment, the time domain filtering may be mean filtering, where the mean value of the filtering kernel composed of a set number of pixel point matrices is used to replace the value of the current central i point of the filtering kernel; or Gaussian filtering is selected to assume that the weight contribution of the pixel j to the pixel i and the distance between the pixel j and the pixel i are related, the distribution of the weight along with the distance meets a Gaussian function, the weight of the position with the closer distance is larger, the weight with the farther distance is smaller, and finally, the weighted sum is carried out on all pixels and the weights corresponding to the pixels in a filtering core formed by a set number of pixel point matrixes, and then the weighted sum is divided by the total weight to normalize, so that the obtained result is used as the value of the central pixel i. The filter kernel refers to the coordinates (including i itself) of j positions around the image when the value of the image at the coordinate i is processed, and the j adjacent positions are the filter kernels. The manner of temporally filtering the first image group may be the same as or different from the manner of temporally filtering the second image group. By performing temporal filtering on multiple frames of images in the same image group, optionally, a motion compensation temporal filtering method is selected for multiple frames of images in the same image group, motion information in the multiple frames of images is detected by comparing pixel differences between successive image frames in the image group, motion parameters of a moving object (gas flow) in the images are estimated by using the detected motion information, motion compensation is performed on background images/foreground images obtained by using the estimated motion parameters on temporal filtering results of the corresponding image groups, and temporal filtering can reduce motion blur so as to define gas areas in the images more accurately and obtain background images/foreground images with more gas information highlighted.
In the above embodiment, the first image group and the second image group are divided according to the time sequence, the two image groups respectively include the same number of continuous multi-frame images, and according to the gas flow characteristics, the shape change formed in the images due to the gas floating characteristics is effectively identified by utilizing the difference of the image information included in the continuous multi-frame images, so that the gas area in the images is accurately defined.
In some embodiments, the extracting details according to the current frame image to obtain a current frame detail image, and performing image enhancement processing to obtain a current frame enhanced image, includes:
performing frequency domain filtering on the current frame image to obtain a filtered frame image;
performing difference value calculation on the current frame image and the filtered frame image to extract details of the current frame image to obtain a current frame detail image;
and carrying out histogram equalization processing on the filtered frame image to obtain a current frame enhanced image after image enhancement processing.
Frequency domain filtering refers to performing fourier transform on an image, converting the image from an image space to a frequency domain space, and then performing analysis processing on the frequency spectrum of the image in the frequency domain to change the frequency characteristics of the image. In this embodiment, the frequency domain filtering refers to low-pass filtering, and the low-pass filtering is performed on the current frame image, so that the high-frequency signal exceeding the set critical value is blocked and weakened, and the blocking and weakening amplitude of the high-frequency signal is correspondingly set according to different frequencies and different filtering purposes, so as to obtain the filtered image. Optionally, the frequency domain filtering may also be bilateral filtering, and combines spatial proximity of the image and pixel value pixel degree, and takes airspace information and gray level similarity into consideration, so as to achieve the purpose of edge protection and denoising.
And carrying out difference on the current frame image and the filtered frame image obtained after frequency domain filtering, and respectively and correspondingly subtracting the difference of the gray values of the pixel points in the corresponding filtered frame image according to the gray values of the pixel points in the current frame image to obtain a detail image of the current frame. And carrying out image enhancement processing according to the current frame image, namely carrying out histogram equalization processing on the filtered frame image obtained after frequency domain filtering, and utilizing the histogram equalization processing to pull apart the gray scale distance of the image in the filtered frame image, increase the contrast, make the image detail clear, realize image space enhancement and obtain the current frame enhanced image containing original image temperature information.
In the above embodiment, a specific implementation scheme is provided for extracting details of a current frame image to obtain a current frame detail image and performing image enhancement processing to obtain a current frame enhanced image, by using the current frame image to respectively obtain a detail image containing edge information in a scene and an enhanced image containing temperature information in the scene, edge information of a gas imaging area in the enhanced image and temperature information for enhancing a characteristic gas form are respectively provided for subsequent image fusion in a targeted manner, so that the purpose that the finally obtained fused gas infrared image can effectively highlight a gas effect is achieved.
In some embodiments, the acquiring a current frame image of a target scene including a region to be measured and a continuous multi-frame image associated with the current frame image includes:
acquiring infrared images acquired in real time aiming at a target scene containing a region to be detected, and sequentially storing the infrared images in an image array with a set length;
if the number of images in the image array reaches a preset value, taking the infrared image which is finally acquired in the image array as a current frame image, and taking the infrared image stored in the image array as an associated continuous multi-frame image; or alternatively, the first and second heat exchangers may be,
and if the number of the images in the image array reaches a preset value, taking the infrared image acquired next as a current frame image, and taking the infrared image stored in the image array as an associated continuous multi-frame image.
The gas infrared image processing method can be applied to a gas leak detector, the gas leak detector can comprise an infrared image acquisition module, the gas leak detector comprises an infrared lens and an infrared detector, the infrared lens can converge infrared light signals in a target scene, the infrared detector converts the infrared light signals into electric signals, and the infrared focal plane output signals are subjected to analog-digital conversion, non-uniform correction, blind pixel replacement and the like to obtain infrared images corresponding to the target scene. The user can shoot infrared images of a target scene needing to be detected whether the gas leak detection exists in real time by holding the gas leak detector, and an image array with a set length is arranged, so that a plurality of infrared images acquired in real time are sequentially stored in the image array. Alternatively, the gas leak detector can be used for continuously shooting a single infrared image and sequentially storing the single infrared image in the image array, or shooting a video and dividing the video into a plurality of video frames and sequentially storing the video frames in the image array. The length of the image array may be the same as or greater than the number of images required to form the first and second image sets.
In an example, the number of images required for forming the first image group and the second image group is eight, the length of the image group is set to be nine, when the memory of the image group is full, the last stored infrared image positioned at the first position of the image group is used as the current frame image, other images in the image group are used as the associated continuous multi-frame images, the gas infrared image processing method of the embodiment of the application is executed, the subsequently collected infrared images are sequentially stored in the image group in a first-in first-out manner, the subsequently collected infrared images positioned at the first position of the stored image group are respectively used as the current frame image, and the other images in the image group are used as the associated continuous multi-frame images, so that the above-mentioned processes are circularly executed. In the implementation manner of determining the current frame image and the continuous multi-frame image associated with the current frame image by using the image array, when the image array is first full, the image data which is subsequently removed from the image array according to the first-in first-out may be sequentially stored in the designated other storage area.
In another example, the number of images required for forming the first image group and the second image group is eight, the length of the image group is set to be eight, when the memory of the image group is full, the infrared images to be stored next in the image group are regarded as current frame images, all the images in the image group at the moment are regarded as associated continuous multi-frame images, the gas infrared image processing method of the embodiment of the application is executed, the infrared images collected subsequently are sequentially stored in the image group in a first-in first-out manner, the infrared images to be stored in the image group collected subsequently are regarded as current frame images respectively, and all the images in the image group at the corresponding moment are regarded as associated continuous multi-frame images, and the above-mentioned processes are executed in a circulating manner.
In the above embodiment, the infrared images corresponding to the target scene may be acquired in real time for processing, and according to the fused gas infrared images obtained after processing, real-time analysis may be performed to determine whether there is a risk of gas leakage in the target scene.
In some embodiments, the performing image fusion based on the differential image, the current frame detail image, and the current frame enhanced image to obtain a fused gas infrared image includes:
acquiring fusion proportion information;
and carrying out image fusion on the differential image, the current frame detail image and the current frame enhanced image according to the fusion proportion information to obtain a fused gas infrared image.
The fusion proportion information is the weight value of the fusion of the differential image, the current frame detail image and the current frame enhanced image. The fusion proportion information can be a preset default value or can be obtained by manual setting of a user in the use process. In this embodiment, the better fusion effect can be ensured by the fusion ratio of the differential image, the detail image of the current frame and the enhanced image of the current frame.
Optionally, the acquiring the fusion proportion information includes:
Acquiring a first weight value corresponding to a differential image based on a setting operation of the differential image weight;
determining a second weight value and a third weight value respectively corresponding to the current frame detail image and the current frame enhancement image according to the differential image weight value and a preset rule;
and obtaining fusion proportion information according to the first weight value, the second weight and the third weight value.
The fusion proportion information is obtained through manual setting by a user in the using process. The gas leak detector may be provided with a user interface through which configuration items for setting the fusion ratio information are provided. The configuration item can be set as a weight value corresponding to the difference image, the current frame detail image and the current frame enhancement image respectively which are directly input by a user; or may be set to a weight ratio of the differential image, the current frame detail image, and the current frame enhanced image input by the user; or may be configured to be adjusted up and down by the user on a default basis. In this embodiment, the gas leak detector provides a configuration item for setting the differential image weight through the user operation interface, and the user sets or adjusts the differential image weight in the user operation interface to obtain a first weight value corresponding to the differential image; the second weight value and the third weight value corresponding to the current frame detail image and the current frame enhancement image respectively are automatically determined according to the first weight value, for example, the sum of the first weight value, the second weight value and the third weight value is kept unchanged, and the second weight value and the third weight value are kept unchanged in a certain proportion, so that after the first weight value is determined, the second weight value and the third weight value can be automatically determined according to the first weight value.
In the above embodiment, the obtaining of the fusion proportion information may be determined by setting only the differential image weight by the user, where the differential image mainly includes gas information in the target scene, the differential image weight may be appropriately increased when the gas is not obvious, and the differential image weight may be appropriately reduced when the noise is large, the detail image of the current frame mainly includes edge information in the target scene, the greater the weight is, the sharper the edge is, the enhanced image of the current frame mainly includes temperature information, the greater the gray value is, the higher the temperature is, the indicating effect is given to the temperature distribution in the target scene, and the specific gravity of the detail image of the current frame and the enhanced image of the current frame may be determined by empirical values.
Optionally, the acquiring the fusion proportion information further includes:
displaying the setting prompt information of the differential image weight in the current setting page; the setting prompt information comprises information that the differential image weight value is increased to enhance the display gas, and the differential image weight value is reduced to reduce the image noise.
The gas leak detector displays the setting prompt information of the differential image weight in the current setting page, so that a user can adjust the differential image weight according to the setting prompt information, accordingly adjust the display effect of the fused gas infrared image, and obtain the gas infrared image with the best gas highlighting effect.
In order to provide a more general understanding of the gas infrared image processing method provided in the embodiments of the present application, please refer to fig. 4 and 5 in combination, an example in which the gas infrared image processing method is applied to a gas leak detector is described, and the gas infrared image processing method includes:
s11, acquiring infrared images aiming at a target scene in real time; the gas leak detector comprises an infrared shooting module, wherein the infrared shooting module is used for carrying out analog-to-digital conversion on a focusing plane output signal, carrying out non-uniformity correction, blind pixel replacement and the like, and finally obtaining a first gray level image of a scene, namely an original infrared image;
s12, transmitting the first gray level images to a memory for sequential storage to obtain an image array for storing the first gray level images with preset number; the memory can hold continuous multi-frame first gray level images within a certain time and can realize real-time updating;
s13, dividing the continuous multi-frame first gray level images into two groups according to time sequence, wherein each group comprises more than 1 frame and then is respectively transmitted to a filtering unit, and the filtering unit can realize time domain filtering of the multi-frame images;
s14, performing time domain filtering on the first group of images and taking the result as a background image; the filtering method may include mean filtering, gaussian filtering, etc.;
S15, performing time domain filtering on the second group of images and taking the result as a foreground image; the filtering method can also comprise mean filtering, gaussian filtering and the like;
s16, transmitting the foreground image and the background image to a differential unit, wherein the differential unit can perform differential operation on the foreground image and the background image to obtain a first differential image; i.e., an initial differential image;
s17, the first difference image is subjected to threshold processing, histogram equalization, linear mapping and other processing by an image processing unit to obtain a second difference image; i.e., a differential image; the differential image tends to have abnormal maximum values or minimum values at the edge positions with rapid change of gray values, and the abnormal values can be removed by threshold processing; while histogram equalization plays a role in enhancing contrast and reducing image noise; the effect of the linear mapping can adjust the pixel with gray value of 0 before processing to be still 0 after processing, and the difference value caused by gas floating is positive or negative, so that the bright position is brighter and the dark position is darker on the final image, thereby achieving the purpose of highlighting the gas effect.
S18, performing low-pass filtering (such as bilateral filtering) on the first gray level image of the current frame to obtain a second gray level image of the current frame; that is, the first gray level image of the current frame is the current frame image, and the second gray level image of the current frame is the filtered frame image;
S19, obtaining a detail image of the current frame by making a difference between the first gray level image of the current frame and the second gray level image of the current frame;
s110, carrying out histogram equalization on the second gray level image of the current frame to obtain a third gray level image of the current frame; that is, the current frame enhances the image;
and S111, fusing the third gray level image of the current frame, the detail image of the current frame and the second difference image according to a certain proportion to obtain a final gas enhanced image. The third gray level image of the current frame contains temperature information, and the larger the gray level value is, the higher the temperature is, so that the temperature in the scene is indicated to a certain extent; the detail image of the current frame contains edge information in the scene, and the larger the weight is, the clearer the edge is; the second differential image mainly contains gas information. The specific gravity of the first two may be given by experience as a default value, the weight of the second differential image may be input through the user interface, the weight may be appropriately reduced when the noise is large, and the weight may be appropriately increased when the gas is not obvious.
According to the gas infrared image processing method provided by the embodiment, the difference image is calculated by utilizing the foreground image and the background image which are obtained by processing the continuous multi-frame images, more image characteristic information capable of identifying whether gas information exists in a target scene can be contained, and the fused gas infrared image which can finally highlight the gas display effect is obtained by carrying out image fusion on the difference image, the current frame detail image and the current frame enhancement image, so that noise can be suppressed, the gas contrast in the infrared image is enhanced, temperature information which can be reflected by the infrared image is reserved, the contrast of the gas in the image is enhanced, and a full positive effect can be exerted on enhancing the display of the gas in the image.
Referring to fig. 6, another aspect of the present application provides a gas infrared image processing apparatus, including: an acquisition module 61, configured to acquire a current frame image of a target scene including a region to be detected and a continuous multi-frame image associated with the current frame image; a first image processing module 62, configured to divide the continuous multi-frame images according to a time attribute of the continuous multi-frame images to obtain a first image group including at least two frames of images and a second image group including at least two frames of images, perform temporal filtering based on the first image group and the second image group to obtain a background image and a foreground image, and determine a differential image including gas information in the target scene according to the foreground image and the background image; a second image processing module 63, configured to extract details according to the current frame image to obtain a current frame detail image; a third image processing module 64, configured to perform image enhancement processing according to the current frame image to obtain a current frame enhanced image; and the fusion module is used for carrying out image fusion on the basis of the differential image, the current frame detail image and the current frame enhanced image to obtain a fused gas infrared image.
The first image processing module 62 is further configured to perform a difference calculation on the foreground image and the background image to obtain an initial differential image; performing gas enhancement processing on the initial differential image to obtain a differential image containing gas information in the target scene; the gas enhancement processing comprises threshold processing, histogram equalization processing and linear mapping processing in sequence.
Wherein, the first image processing module 62 is further configured to divide the multiple frames of images with the previous acquisition time into a first image group and divide the multiple frames of images with the subsequent acquisition time into a second image group according to the time attribute of the continuous multiple frames of images; performing time domain filtering on the first image group to obtain a background image; performing time domain filtering on the second image group to obtain a foreground image; wherein the time domain filtering may be selected from one of: mean filtering and Gaussian filtering.
The second image processing module 63 is specifically configured to perform frequency domain filtering on the current frame image to obtain a filtered frame image; performing difference value calculation on the current frame image and the filtered frame image to extract details of the current frame image to obtain a current frame detail image; the third image processing module 64 is configured to perform histogram equalization processing on the filtered frame image, so as to obtain an enhanced image of the current frame after the image enhancement processing.
The acquiring module 61 is configured to acquire an infrared image acquired in real time for a target scene including a region to be detected, and sequentially store the infrared image in an image array with a set length; if the number of images in the image array reaches a preset value, taking the infrared image which is finally acquired in the image array as a current frame image, and taking the infrared image stored in the image array as an associated continuous multi-frame image; or if the number of images in the image array reaches a preset value, taking the infrared image acquired next as a current frame image, and taking the infrared image stored in the image array as an associated continuous multi-frame image.
The fusion module 64 is configured to obtain fusion proportion information; and carrying out image fusion on the differential image, the current frame detail image and the current frame enhanced image according to the fusion proportion information to obtain a fused gas infrared image.
The fusion module 64 is configured to obtain a first weight value corresponding to the differential image based on a setting operation of the differential image weight; determining a second weight value and a third weight value respectively corresponding to the current frame detail image and the current frame enhancement image according to the differential image weight value and a preset rule; and obtaining fusion proportion information according to the first weight value, the second weight and the third weight value.
The fusion module 64 is configured to display setting prompt information of the differential image weight in the current setting page; the setting prompt information comprises information that the differential image weight value is increased to enhance the display gas, and the differential image weight value is reduced to reduce the image noise.
It should be noted that: in the gas infrared image processing apparatus provided in the above embodiment, only the division of each program module is used for illustration in the infrared image processing process, in practical application, the processing allocation may be completed by different program modules according to needs, i.e. the internal structure of the apparatus may be divided into different program modules, so as to complete all or part of the method steps described above. In addition, the gas infrared image processing device and the gas infrared image processing method provided in the foregoing embodiments belong to the same concept, and detailed implementation processes of the gas infrared image processing device and the gas infrared image processing method are detailed in the method embodiments and are not repeated herein.
Referring to fig. 7, in another aspect of the embodiments of the present application, there is further provided a gas leak detector, including a memory 1141 and a processor 1142, where the memory 1141 stores a computer program, and the computer program when executed by the processor 1142 causes the processor 1142 to perform the gas infrared image processing method according to any embodiment of the present application.
Optionally, the gas leak detector further comprises an infrared image acquisition module 115; the image acquisition module 115 is configured to acquire an infrared image for a target scene, and store the infrared image in the memory 1141.
In another aspect of the embodiments of the present application, a computer readable storage medium is further provided, where a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the processes of the embodiments of the gas infrared image processing method are implemented, and the same technical effects can be achieved, so that repetition is avoided, and no redundant description is provided herein. Wherein, the computer readable storage medium is Read-only memory (ROM), random Access Memory (RAM), magnetic disk or optical disk, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a smart device (which may be a mobile phone, a computer, a server, etc.) to perform the method according to the embodiments of the present invention.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of processing a gaseous infrared image, comprising:
Acquiring a current frame image of a target scene containing a region to be detected and a continuous multi-frame image associated with the current frame image;
dividing according to the time attribute of the continuous multi-frame images to obtain a first image group comprising at least two frames of images and a second image group comprising at least two frames of images, respectively performing time domain filtering on the basis of the first image group and the second image group to obtain a background image and a foreground image, and determining a differential image containing gas information in the target scene according to the foreground image and the background image;
extracting details according to the current frame image to obtain a current frame detail image, and performing image enhancement processing to obtain a current frame enhancement image;
and carrying out image fusion on the basis of the differential image, the current frame detail image and the current frame enhanced image to obtain a fused gas infrared image.
2. The gas infrared image processing method of claim 1, wherein the determining a differential image containing gas information in the target scene from the foreground image and the background image comprises:
performing difference calculation on the foreground image and the background image to obtain an initial difference image;
Performing gas enhancement processing on the initial differential image to obtain a differential image containing gas information in the target scene; the gas enhancement processing comprises threshold processing, histogram equalization processing and linear mapping processing in sequence.
3. The gas infrared image processing method according to claim 2, wherein the dividing according to the time attribute of the continuous multi-frame image to obtain a first image group including at least two frames of images and a second image group including at least two frames of images, and performing temporal filtering based on the first image group and the second image group to obtain a background image and a foreground image, respectively, includes:
dividing the multi-frame images with the previous acquisition time into a first image group and dividing the multi-frame images with the subsequent acquisition time into a second image group according to the time attribute of the continuous multi-frame images;
performing time domain filtering on the first image group to obtain a background image;
performing time domain filtering on the second image group to obtain a foreground image;
wherein the time domain filtering may be selected from one of: mean filtering and Gaussian filtering.
4. The gas infrared image processing method according to claim 1, wherein the extracting details from the current frame image to obtain a current frame detail image, and performing image enhancement processing to obtain a current frame enhanced image, comprises:
Performing frequency domain filtering on the current frame image to obtain a filtered frame image;
performing difference value calculation on the current frame image and the filtered frame image to extract details of the current frame image to obtain a current frame detail image;
and carrying out histogram equalization processing on the filtered frame image to obtain a current frame enhanced image after image enhancement processing.
5. The gas infrared image processing method according to claim 1, wherein the acquiring a current frame image of a target scene including a region to be measured and a continuous multi-frame image associated with the current frame image includes:
acquiring infrared images acquired in real time aiming at a target scene containing a region to be detected, and sequentially storing the infrared images in an image array with a set length;
if the number of images in the image array reaches a preset value, taking the infrared image which is finally acquired in the image array as a current frame image, and taking the infrared image stored in the image array as an associated continuous multi-frame image; or alternatively, the first and second heat exchangers may be,
and if the number of the images in the image array reaches a preset value, taking the infrared image acquired next as a current frame image, and taking the infrared image stored in the image array as an associated continuous multi-frame image.
6. The gas infrared image processing method according to any one of claims 1 to 5, wherein the performing image fusion based on the differential image, the current frame detail image, and the current frame enhanced image to obtain a fused gas infrared image includes:
acquiring fusion proportion information;
and carrying out image fusion on the differential image, the current frame detail image and the current frame enhanced image according to the fusion proportion information to obtain a fused gas infrared image.
7. The gas infrared image processing method as set forth in claim 6, wherein the acquiring of the fusion ratio information includes:
acquiring a first weight value corresponding to a differential image based on a setting operation of the differential image weight;
determining a second weight value and a third weight value respectively corresponding to the current frame detail image and the current frame enhancement image according to the differential image weight value and a preset rule;
and obtaining fusion proportion information according to the first weight value, the second weight and the third weight value.
8. The gas infrared image processing method as set forth in claim 7, wherein the acquiring of the fusion ratio information further comprises:
Displaying the setting prompt information of the differential image weight in the current setting page; the setting prompt information comprises information that the differential image weight value is increased to enhance the display gas, and the differential image weight value is reduced to reduce the image noise.
9. A gas leak detector comprising a memory and a processor; the memory stores a computer program which, when executed by the processor, causes the processor to perform the gas infrared image processing method as claimed in any one of claims 1 to 8.
10. A computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the gas infrared image processing method according to any one of claims 1 to 8.
CN202310533195.5A 2023-05-09 2023-05-09 Gas infrared image processing method, gas leak detector and storage medium Pending CN116543022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310533195.5A CN116543022A (en) 2023-05-09 2023-05-09 Gas infrared image processing method, gas leak detector and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310533195.5A CN116543022A (en) 2023-05-09 2023-05-09 Gas infrared image processing method, gas leak detector and storage medium

Publications (1)

Publication Number Publication Date
CN116543022A true CN116543022A (en) 2023-08-04

Family

ID=87455675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310533195.5A Pending CN116543022A (en) 2023-05-09 2023-05-09 Gas infrared image processing method, gas leak detector and storage medium

Country Status (1)

Country Link
CN (1) CN116543022A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893643A (en) * 2024-03-18 2024-04-16 四川弘和数智集团有限公司 Method, device, equipment and medium for generating gas leakage image of oil and gas station compressor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893643A (en) * 2024-03-18 2024-04-16 四川弘和数智集团有限公司 Method, device, equipment and medium for generating gas leakage image of oil and gas station compressor

Similar Documents

Publication Publication Date Title
CN106780392B (en) Image fusion method and device
CN116309559B (en) Intelligent identification method for production flaws of medium borosilicate glass
CN114119436A (en) Infrared image and visible light image fusion method and device, electronic equipment and medium
CA2989188A1 (en) Method for ir or thermal image enchancement based on scene information for video analysis
CN114240789A (en) Infrared image histogram equalization enhancement method based on optimized brightness keeping
CN116543022A (en) Gas infrared image processing method, gas leak detector and storage medium
Wang et al. Low-light image joint enhancement optimization algorithm based on frame accumulation and multi-scale Retinex
CN111444555B (en) Temperature measurement information display method and device and terminal equipment
Dong et al. Infrared target detection in backlighting maritime environment based on visual attention model
CN111311562B (en) Ambiguity detection method and device for virtual focus image
CN108447031A (en) A kind of method of the hot ambient noise correction of infrared image
CN105719252B (en) A kind of patrolling railway image real time high dynamic range method for drafting and device
Vananti et al. Improved detection of faint streaks based on a streak-like spatial filter
CN114140481A (en) Edge detection method and device based on infrared image
CN107316318A (en) Aerial target automatic testing method based on multiple subarea domain Background fitting
Zeng et al. High dynamic range infrared image compression and denoising
CN115965773B (en) Gas leakage detection system based on big data of Internet of things
CN110136085B (en) Image noise reduction method and device
CN117218026A (en) Infrared image enhancement method and device
Yu et al. A novel Retinex based enhancement algorithm considering noise
Katırcıoğlu et al. A novel gray image enhancement using the regional similarity transformation function and dragonfly algorithm
CN115423861A (en) Gas leakage detection method and device, equipment and storage medium
CN115115653A (en) Refined temperature calibration method for cold and hot impact test box
WO2021189460A1 (en) Image processing method and apparatus, and movable platform
CN108230350A (en) A kind of infrared motion target detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination