Infrared image correction method and device and storage medium

文档序号:1671276 发布日期:2019-12-31 浏览:9次 中文

阅读说明:本技术 红外图像的校正方法、装置及存储介质 (Infrared image correction method and device and storage medium ) 是由 马甲迎 唐杰 谢浩山 姚丹 陈伟 于 2018-06-22 设计创作,主要内容包括:本发明公开了一种红外图像的校正方法、装置及存储介质,属于图像处理技术领域。所述方法包括:在红外热成像设备工作时,获取红外热成像设备的工作温度;根据工作温度,在预先存储的多个背景模板中筛选2个背景模板;基于2个背景模板确定红外热成像设备获取的每帧原始图像所对应的动态参数;对于红外热成像设备获取的每一帧原始图像,基于2个背景模板与对应的动态参数对原始图像进行校正,得到校正后的图像。该红外热成像设备可以在不使用挡片的情况下,完成对红外热成像设备获取的每一帧原始图像的校正,输出实时的图像,由于可以不设置挡片,避免了出现几帧的时间的盲视现象,并且有效的减小该红外热成像设备的体积和功耗。(The invention discloses a method and a device for correcting an infrared image and a storage medium, and belongs to the technical field of image processing. The method comprises the following steps: when the infrared thermal imaging equipment works, acquiring the working temperature of the infrared thermal imaging equipment; screening 2 background templates from a plurality of prestored background templates according to the working temperature; determining dynamic parameters corresponding to each frame of original images acquired by the infrared thermal imaging equipment based on the 2 background templates; and for each frame of original image acquired by the infrared thermal imaging equipment, correcting the original image based on 2 background templates and corresponding dynamic parameters to obtain a corrected image. The infrared thermal imaging equipment can finish the correction of each frame of original image acquired by the infrared thermal imaging equipment under the condition of not using a separation blade, outputs a real-time image, avoids the blind vision phenomenon of several frames of time due to no separation blade, and effectively reduces the volume and power consumption of the infrared thermal imaging equipment.)

1. A method for correcting an infrared image, the method being applied to an infrared thermal imaging device, the method comprising:

when the infrared thermal imaging equipment works, acquiring the working temperature of the infrared thermal imaging equipment;

screening 2 background templates from a plurality of pre-stored background templates according to the working temperature, wherein the background templates correspond to the temperatures one by one, the 2 background templates comprise a first background template with the corresponding temperature higher than the working temperature and a second background template with the corresponding temperature lower than the working temperature, and the background templates are images reflecting background noise of the infrared thermal imaging equipment;

determining dynamic parameters corresponding to each frame of original images acquired by the infrared thermal imaging equipment based on the 2 background templates;

and correcting each frame of original image acquired by the infrared thermal imaging equipment based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image.

2. The method of claim 1,

the correcting the original image based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image, including:

determining background noise corresponding to the original image based on the 2 background templates and corresponding dynamic parameters;

and correcting the original image based on the gray value of the pixel in the original image and the corresponding background noise to obtain a corrected image.

3. The method of claim 2,

determining the background noise corresponding to the original image based on the 2 background templates and the corresponding dynamic parameters, including:

calculating the background noise corresponding to the original image based on a background noise calculation formula, wherein the background noise calculation formula is as follows:

offsetN(i,j)=m1N×BL(i,j)+m2N×BH(i,j)+cN

wherein (i, j) represents the pixel coordinate, offsetNM1 representing the corresponding background noise of the original image of the Nth frameN、m2NAnd cNRepresenting the dynamic parameter corresponding to the original image of the Nth frame, BHRepresenting a gray value, B, of a pixel in the first background templateLAnd representing the gray value of the pixel in the second background template, wherein N is more than or equal to 1.

4. The method of claim 3,

correcting the original image based on the gray value of the pixel in the original image and the corresponding background noise to obtain a corrected image, wherein the correction comprises the following steps:

correcting the original image based on a correction formula, wherein the correction formula is as follows:

ImgN(i,j)=Gain(i,j)×[outN(i,j)-offsetN(i,j)];

wherein ImgNRepresenting the gray value, out, of the pixel in the corrected image of the Nth frameNAnd representing the gray value of a pixel in the original image of the Nth frame, and Gain representing a Gain coefficient matrix.

5. The method according to any one of claims 1 to 4,

the determining, based on the 2 background templates, the dynamic parameter corresponding to each frame of original image acquired by the infrared thermal imaging device includes:

for the 1 st frame of original image, calculating the dynamic parameters corresponding to the 1 st frame of original image based on the temperatures corresponding to the 2 background templates;

for an M & ltth & gt frame original image, wherein M is more than or equal to 2, a plurality of effective pixel combinations are obtained from the M-1 frame corrected image, each effective pixel combination comprises two adjacent pixels, and the absolute value of the difference value of the gray values of the two adjacent pixels is less than or equal to a preset threshold value;

and calculating dynamic parameters corresponding to the Mth frame of image based on the 2 background templates and the plurality of effective pixel combinations.

6. The method of claim 5,

the calculating the dynamic parameters corresponding to the 1 st frame of original image based on the temperatures corresponding to the 2 background templates includes:

calculating the dynamic parameters corresponding to the 1 st frame of original image based on a first dynamic parameter equation set, wherein the first dynamic parameter equation set is as follows:

Figure FDA0001705336760000021

wherein m11、m21And c1Representing the corresponding dynamic parameter, t, of the original image of frame 1HRepresents the temperature, t, corresponding to the first background templateLRepresents the temperature, t, corresponding to the second background template0Representing an operating temperature of the infrared thermal imaging apparatus.

7. The method of claim 5,

the calculating the dynamic parameters corresponding to the Mth frame of image based on the 2 background templates and the plurality of effective pixel combinations comprises:

calculating the dynamic parameters corresponding to the original image of the Mth frame based on a second dynamic parameter equation set, wherein the second dynamic parameter equation set is as follows:

Figure FDA0001705336760000031

wherein m1M、m2MAnd cMRepresenting the dynamic parameter corresponding to the M frame original image, n representing the number of the effective pixel combinations, a and B representing the pixel position of the i group of effective pixel combinations respectively, X (a) representing the gray value of the pixel at the pixel position a in the M frame original image, X (B) representing the gray value of the pixel at the pixel position B in the M frame original image, BHRepresenting a gray value, B, of a pixel in the first background templateLRepresenting the gray values of the pixels in the second background template.

8. The method of claim 1, wherein the infrared thermal imaging device comprises an infrared focal plane array detector, and wherein the obtaining an operating temperature of the infrared thermal imaging device comprises:

and determining the focal plane temperature of the infrared focal plane array detector as the working temperature of the infrared thermal imaging equipment.

9. The method of claim 1, wherein the infrared thermal imaging device comprises an infrared focal plane array detector, wherein the infrared focal plane array detector is a detector with a response rate that increases with increasing operating temperature, and wherein the pre-stored plurality of background templates comprises: the temperature difference between any two adjacent first temperatures is larger than that between any two adjacent second temperatures when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

10. The method of claim 1, wherein the infrared thermal imaging device comprises an infrared focal plane array detector, wherein the infrared focal plane array detector is a detector with a response rate that decreases as the operating temperature increases, and wherein the pre-stored plurality of background templates comprises: when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is smaller than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

11. An infrared image correction device, which is applied to an infrared thermal imaging device, is characterized by comprising:

the acquisition module is used for acquiring the working temperature of the infrared thermal imaging equipment when the infrared thermal imaging equipment works;

the screening module is used for screening 2 background templates from a plurality of prestored background templates according to the working temperature, wherein the background templates correspond to a plurality of temperatures one by one, the 2 background templates comprise a first background template with the corresponding temperature higher than the working temperature and a second background template with the corresponding temperature lower than the working temperature, and the background templates are images reflecting background noise of the infrared thermal imaging equipment;

the determining module is used for determining dynamic parameters corresponding to each frame of original images acquired by the infrared thermal imaging equipment based on the 2 background templates;

and the correction module is used for correcting each frame of original image acquired by the infrared thermal imaging equipment based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image.

12. The apparatus of claim 11,

the correction module comprises:

a first determining unit, configured to determine, based on the 2 background templates and corresponding dynamic parameters, a background noise corresponding to the original image;

and the correcting unit is used for correcting the original image based on the gray value of the pixel in the original image and the corresponding background noise to obtain a corrected image.

13. The apparatus of claim 12,

the first determining unit is configured to:

calculating the background noise corresponding to the original image based on a background noise calculation formula, wherein the background noise calculation formula is as follows:

offsetN(i,j)=m1N×BL(i,j)+m2N×BH(i,j)+cN

wherein (i, j) represents the pixel coordinate, offsetNM1 representing the corresponding background noise of the original image of the Nth frameN、m2NAnd cNRepresenting the dynamic parameter corresponding to the original image of the Nth frame,BHRepresenting a gray value, B, of a pixel in the first background templateLAnd representing the gray value of the pixel in the second background template, wherein N is more than or equal to 1.

14. The apparatus of claim 13,

the correction unit is used for:

correcting the original image based on a correction formula, wherein the correction formula is as follows:

ImgN(i,j)=Gain(i,j)×[outN(i,j)-offsetN(i,j)];

wherein ImgNRepresenting the gray value, out, of the pixel in the corrected image of the Nth frameNAnd representing the gray value of a pixel in the original image of the Nth frame, and Gain representing a Gain coefficient matrix.

15. The apparatus according to any one of claims 11 to 14,

the determining module includes:

the first calculating unit is used for calculating the dynamic parameters corresponding to the 1 st frame of original image based on the temperatures corresponding to the 2 background templates for the 1 st frame of original image;

the image processing device comprises an acquisition unit, a correction unit and a processing unit, wherein the acquisition unit is used for acquiring a plurality of effective pixel combinations in an M-1 frame corrected image, wherein M is more than or equal to 2 of an M frame original image, each effective pixel combination comprises two adjacent pixels, and the absolute value of the difference value of the gray values of the two adjacent pixels is less than or equal to a preset threshold;

and the second calculating unit is used for calculating dynamic parameters corresponding to the Mth frame of image based on the 2 background templates and the plurality of effective pixel combinations.

16. The apparatus of claim 15,

the first computing unit is configured to:

calculating the dynamic parameters corresponding to the 1 st frame of original image based on a first dynamic parameter equation set, wherein the first dynamic parameter equation set is as follows:

Figure FDA0001705336760000061

wherein m11、m21And c1Representing the corresponding dynamic parameter, t, of the original image of frame 1HRepresents the temperature, t, corresponding to the first background templateLRepresents the temperature, t, corresponding to the second background template0Representing an operating temperature of the infrared thermal imaging apparatus.

17. The apparatus of claim 15,

the second computing unit is configured to:

calculating the dynamic parameters corresponding to the original image of the Mth frame based on a second dynamic parameter equation set, wherein the second dynamic parameter equation set is as follows:

Figure FDA0001705336760000062

wherein m1M、m2MAnd cMRepresenting the dynamic parameter corresponding to the M frame original image, n representing the number of the effective pixel combinations, a and B representing the pixel position of the i group of effective pixel combinations respectively, X (a) representing the gray value of the pixel at the pixel position a in the M frame original image, X (B) representing the gray value of the pixel at the pixel position B in the M frame original image, BHRepresenting a gray value, B, of a pixel in the first background templateLRepresenting the gray values of the pixels in the second background template.

18. The apparatus of claim 11,

the acquisition module includes:

and the second determination unit is used for determining the focal plane temperature of the infrared focal plane array detector as the working temperature of the infrared thermal imaging equipment.

19. The apparatus of claim 11, wherein the infrared thermal imaging device comprises an infrared focal plane array detector, wherein the infrared focal plane array detector is a detector with a response rate that increases with increasing operating temperature, and wherein the pre-stored plurality of background templates comprises: the temperature difference between any two adjacent first temperatures is larger than that between any two adjacent second temperatures when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

20. The apparatus of claim 11, wherein the infrared thermal imaging device comprises an infrared focal plane array detector, wherein the infrared focal plane array detector is a detector with a response rate that decreases as the operating temperature increases, and wherein the pre-stored plurality of background templates comprises: when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is smaller than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

21. A storage medium having stored therein code instructions to be executed by a processor to perform a method of correcting an infrared image according to any one of claims 1 to 10.

Technical Field

The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for correcting an infrared image, and a storage medium.

Background

The infrared imaging technology is an important technology of an imaging system, and an infrared focal plane array detector is generally adopted to carry out infrared imaging on a target object at present. However, in the current infrared thermal imaging device, the response between each detecting element in the infrared focal plane array detector is inconsistent, so that the imaging through the infrared focal plane array detector generally has a non-uniformity problem, and the imaging quality is seriously influenced because the imaging shows space noise or fixed pattern noise on an infrared image.

In order to improve the display quality of the infrared image, non-uniform correction needs to be carried out on the infrared image, a series of correction parameters needed for correction are generally obtained in advance, then the correction parameters are read and processed correspondingly, but when the working temperature of the infrared focal plane array detector drifts, the former parameters are not suitable for the temperature after the drift. When the temperature drift is large, a blocking sheet preset in the infrared thermal imaging device needs to be shot to acquire background noise, and the correction parameters are updated based on the background noise. However, during the period of shooting the blocking sheet, a blind vision phenomenon of several frames of time occurs, the continuous observation of the target object cannot be kept, the imaging efficiency is affected, and the blocking sheet belongs to a mechanical structure, so that the volume of an imaging system can be increased.

Disclosure of Invention

The application provides a method and a device for correcting an infrared image and a storage medium, which can solve the problems that the size of the existing imaging system is large and the blind vision phenomenon of several frames of time can occur. The technical scheme is as follows:

in a first aspect, a method for correcting an infrared image is provided, where the method is applied to an infrared thermal imaging device, and the method includes:

when the infrared thermal imaging equipment works, acquiring the working temperature of the infrared thermal imaging equipment;

screening 2 background templates from a plurality of pre-stored background templates according to the working temperature, wherein the background templates correspond to the temperatures one by one, the 2 background templates comprise a first background template with the corresponding temperature higher than the working temperature and a second background template with the corresponding temperature lower than the working temperature, and the background templates are images reflecting background noise of the infrared thermal imaging equipment;

determining dynamic parameters corresponding to each frame of original images acquired by the infrared thermal imaging equipment based on the 2 background templates;

and correcting each frame of original image acquired by the infrared thermal imaging equipment based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image.

Optionally, the correcting the original image based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image includes:

determining background noise corresponding to the original image based on the 2 background templates and corresponding dynamic parameters;

and correcting the original image based on the gray value of the pixel in the original image and the corresponding background noise to obtain a corrected image.

Optionally, the correcting the original image based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image includes:

calculating the background noise corresponding to the original image based on a background noise calculation formula, wherein the background noise calculation formula is as follows:

offsetN(i,j)=m1N×BL(i,j)+m2N×BH(i,j)+cN

wherein (i, j) represents the pixel coordinate, offsetNM1 representing the corresponding background noise of the original image of the Nth frameN、m2NAnd cNRepresenting the dynamic parameter corresponding to the original image of the Nth frame, BHRepresenting a gray value, B, of a pixel in the first background templateLAnd representing the gray value of the pixel in the second background template, wherein N is more than or equal to 1.

Optionally, the correcting the original image based on the gray-level value of the pixel in the original image and the corresponding background noise to obtain a corrected image includes:

correcting the original image based on a correction formula, wherein the correction formula is as follows:

ImgN(i,j)=Gain(i,j)×[outN(i,j)-offsetN(i,j)];

wherein ImgNRepresenting the gray value, out, of the pixel in the corrected image of the Nth frameNAnd representing the gray value of a pixel in the original image of the Nth frame, and Gain representing a Gain coefficient matrix.

Optionally, the determining, based on the 2 background templates, a dynamic parameter corresponding to each frame of original image acquired by the infrared thermal imaging device includes:

for the 1 st frame of original image, calculating the dynamic parameters corresponding to the 1 st frame of original image based on the temperatures corresponding to the 2 background templates;

for an M & ltth & gt frame original image, wherein M is more than or equal to 2, a plurality of effective pixel combinations are obtained from the M-1 frame corrected image, each effective pixel combination comprises two adjacent pixels, and the absolute value of the difference value of the gray values of the two adjacent pixels is less than or equal to a preset threshold value;

and calculating dynamic parameters corresponding to the Mth frame of image based on the 2 background templates and the plurality of effective pixel combinations.

Optionally, the calculating the dynamic parameter corresponding to the 1 st frame of original image based on the temperatures corresponding to the 2 background templates includes:

calculating the dynamic parameters corresponding to the 1 st frame of original image based on a first dynamic parameter equation set, wherein the first dynamic parameter equation set is as follows:

Figure BDA0001705336770000031

wherein m11、m21And c1Representing the corresponding dynamic parameter, t, of the original image of frame 1HRepresents the temperature, t, corresponding to the first background templateLRepresents the temperature, t, corresponding to the second background template0Representing an operating temperature of the infrared thermal imaging apparatus.

Optionally, the calculating, based on the 2 background templates and the plurality of effective pixel combinations, dynamic parameters corresponding to the mth frame of image includes:

calculating the dynamic parameters corresponding to the original image of the Mth frame based on a second dynamic parameter equation set, wherein the second dynamic parameter equation set is as follows:

Figure BDA0001705336770000032

wherein m1M、m2MAnd cMRepresenting the dynamic parameter corresponding to the M frame original image, n representing the number of the effective pixel combinations, a and B representing the pixel position of the i group of effective pixel combinations respectively, X (a) representing the gray value of the pixel at the pixel position a in the M frame original image, X (B) representing the gray value of the pixel at the pixel position B in the M frame original image, BHRepresenting a gray value, B, of a pixel in the first background templateLRepresenting the gray values of the pixels in the second background template.

Optionally, the infrared thermal imaging device includes an infrared focal plane array detector, the obtaining of the operating temperature of the infrared thermal imaging device includes:

and determining the focal plane temperature of the infrared focal plane array detector as the working temperature of the infrared thermal imaging equipment.

Optionally, the infrared thermal imaging device includes an infrared focal plane array detector, the infrared focal plane array detector is a detector whose response rate increases with the rise of the operating temperature, and the pre-stored background templates include: the temperature difference between any two adjacent first temperatures is larger than that between any two adjacent second temperatures when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

Optionally, the infrared thermal imaging device includes an infrared focal plane array detector, the infrared focal plane array detector is a detector whose response rate decreases with the increase of the working temperature, and the pre-stored background templates include: when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is smaller than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

In a second aspect, an apparatus for correcting an infrared image is provided, where the apparatus is applied to an infrared thermal imaging device, and the apparatus includes:

the acquisition module is used for acquiring the working temperature of the infrared thermal imaging equipment when the infrared thermal imaging equipment works;

the screening module is used for screening 2 background templates from a plurality of prestored background templates according to the working temperature, wherein the background templates correspond to a plurality of temperatures one by one, the 2 background templates comprise a first background template with the corresponding temperature higher than the working temperature and a second background template with the corresponding temperature lower than the working temperature, and the background templates are images reflecting background noise of the infrared thermal imaging equipment;

the determining module is used for determining dynamic parameters corresponding to each frame of original images acquired by the infrared thermal imaging equipment based on the 2 background templates;

and the correction module is used for correcting each frame of original image acquired by the infrared thermal imaging equipment based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image.

Optionally, the correction module includes:

the first determining unit is used for determining the background noise corresponding to the original image based on the 2 background templates and the corresponding dynamic parameters;

and the correcting unit is used for correcting the original image based on the gray value of the pixel in the original image and the corresponding background noise to obtain a corrected image.

Optionally, the first determining unit is configured to:

calculating the background noise corresponding to the original image based on a background noise calculation formula, wherein the background noise calculation formula is as follows:

offsetN(i,j)=m1N×BL(i,j)+m2N×BH(i,j)+cN

wherein (i, j) represents the pixel coordinate, offsetNM1 representing the corresponding background noise of the original image of the Nth frameN、m2NAnd cNRepresenting the dynamic parameter corresponding to the original image of the Nth frame, BHRepresenting a gray value, B, of a pixel in the first background templateLAnd representing the gray value of the pixel in the second background template, wherein N is more than or equal to 1.

Optionally, the correction unit is configured to:

correcting the original image based on a correction formula, wherein the correction formula is as follows:

ImgN(i,j)=Gain(i,j)×[outN(i,j)-offsetN(i,j)];

wherein ImgNRepresenting the gray value, out, of the pixel in the corrected image of the Nth frameNRepresenting the gray value of the pixel in the N-th frame of original image, and Gain representing the Gain systemA matrix of numbers.

Optionally, the determining module includes:

the first calculating unit is used for calculating the dynamic parameters corresponding to the 1 st frame of original image based on the temperatures corresponding to the 2 background templates for the 1 st frame of original image;

the image processing device comprises an acquisition unit, a correction unit and a processing unit, wherein the acquisition unit is used for acquiring a plurality of effective pixel combinations in an M-1 frame corrected image, wherein M is more than or equal to 2 of an M frame original image, each effective pixel combination comprises two adjacent pixels, and the absolute value of the difference value of the gray values of the two adjacent pixels is less than or equal to a preset threshold;

and the second calculating unit is used for calculating dynamic parameters corresponding to the Mth frame of image based on the 2 background templates and the plurality of effective pixel combinations.

Optionally, the first computing unit is configured to:

calculating the dynamic parameters corresponding to the 1 st frame of original image based on a first dynamic parameter equation set, wherein the first dynamic parameter equation set is as follows:

Figure BDA0001705336770000061

wherein m11、m21And c1Representing the corresponding dynamic parameter, t, of the original image of frame 1HRepresents the temperature, t, corresponding to the first background templateLRepresents the temperature, t, corresponding to the second background template0Representing an operating temperature of the infrared thermal imaging apparatus.

Optionally, the second calculating unit is configured to:

calculating the dynamic parameters corresponding to the original image of the Mth frame based on a second dynamic parameter equation set, wherein the second dynamic parameter equation set is as follows:

Figure BDA0001705336770000062

wherein m1M、m2MAnd cMRepresenting the Mth frame of the original image pairThe corresponding dynamic parameters, n represents the number of the effective pixel combinations, a and B represent the pixel positions of the i-th group of effective pixel combinations respectively, X (a) represents the gray value of the pixel at the pixel position a in the M-th frame original image, X (B) represents the gray value of the pixel at the pixel position B in the M-th frame original image, BHRepresenting a gray value, B, of a pixel in the first background templateLRepresenting the gray values of the pixels in the second background template.

Optionally, the obtaining module includes:

and the second determination unit is used for determining the focal plane temperature of the infrared focal plane array detector as the working temperature of the infrared thermal imaging equipment.

Optionally, the infrared thermal imaging device includes an infrared focal plane array detector, the infrared focal plane array detector is a detector whose response rate increases with the rise of the operating temperature, and the pre-stored background templates include: the temperature difference between any two adjacent first temperatures is larger than that between any two adjacent second temperatures when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

Optionally, the infrared thermal imaging device includes an infrared focal plane array detector, the infrared focal plane array detector is a detector whose response rate decreases with the increase of the working temperature, and the pre-stored background templates include: when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is smaller than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures.

In a third aspect, a storage medium is provided, in which code instructions are stored, the code instructions being executed by a processor to execute the method for correcting an infrared image according to the first aspect.

The technical scheme provided by the embodiment of the invention has the following beneficial effects:

in summary, according to the infrared image correction method, apparatus, and storage medium provided in the embodiments of the present invention, by obtaining the operating temperature of the infrared thermal imaging device, 2 background templates are screened from a plurality of pre-stored background templates, based on the 2 background templates, a dynamic parameter corresponding to each frame of original image obtained by the infrared thermal imaging device can be determined, and based on the dynamic parameter and the 2 background templates, correction of each frame of original image obtained by the infrared thermal imaging device can be achieved.

Furthermore, when the original image is corrected, the background templates are screened from the plurality of pre-stored background templates, so that only 2 background templates are needed to participate in the correction of the original image, and all background templates are not needed to participate in the correction of the original image, so that the calculation amount is small, the performance requirement on a processor in the infrared thermal imaging device is low, and the manufacturing cost of the infrared thermal imaging device is effectively reduced.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a flowchart of an infrared image correction method according to an embodiment of the present invention;

FIG. 2 is a flow chart of another infrared image correction method provided by the embodiment of the invention;

FIG. 3 is a diagram illustrating the effect of a histogram plotted according to statistical results according to an embodiment of the present invention;

fig. 4 is a block diagram of an apparatus for correcting an infrared image according to an embodiment of the present invention;

FIG. 5 is a block diagram of a calibration module provided by an embodiment of the present invention;

fig. 6 is a block diagram of a determination module according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

In order to improve the display quality of the infrared image, non-uniform correction needs to be carried out on the infrared image, a series of correction parameters needed for correction are generally obtained in advance, then the correction parameters are read and processed correspondingly, but when the working temperature of the infrared focal plane array detector drifts, the former parameters are not suitable for the temperature after the drift. When the temperature drift is large, a blocking sheet preset in the infrared thermal imaging device needs to be shot to acquire background noise, and the correction parameters are updated based on the background noise. However, during the period of shooting the blocking sheet, the blind vision phenomenon of several frames of time can occur, the continuous observation of the target object cannot be kept, the imaging efficiency is influenced, the blocking sheet belongs to a mechanical structure, the size of an imaging system can be increased, the infrared thermal imaging device also needs to drive the blocking sheet to move, and the power consumption of the infrared thermal imaging device is increased.

In the related art, the infrared thermal imaging device may further store a plurality of background templates in advance, where the background templates are images of background noise of the infrared thermal imaging device, and the camera may correct the original image acquired by the infrared thermal imaging device based on the plurality of background templates, but since the infrared thermal imaging device needs all background templates (e.g., 10 background modules, or 12 background templates) to participate in correcting the original image, the amount of calculation is large, the performance requirement on a processor in the infrared thermal imaging device is high, and the manufacturing cost of the infrared thermal imaging device is high.

The embodiment of the invention provides a method for correcting an infrared image, which is applied to infrared thermal imaging equipment, wherein the infrared thermal imaging equipment can be as follows: a thermal imaging engine assembly, an observation type infrared thermal imager or a vehicle-mounted type infrared thermal imager and the like. The method can effectively reduce the manufacturing cost of the infrared thermal imaging device, as shown in fig. 1, fig. 1 is a flowchart of an infrared image correction method provided by an embodiment of the present invention, and the method may include:

step 101, acquiring the working temperature of the infrared thermal imaging device when the infrared thermal imaging device works.

102, screening 2 background templates from a plurality of pre-stored background templates according to the working temperature, wherein the background templates correspond to a plurality of temperatures one by one, the 2 background templates include a first background template with a corresponding temperature higher than the working temperature and a second background template with a corresponding temperature lower than the working temperature, and the background templates are images reflecting background noise of the infrared thermal imaging device.

And 103, determining dynamic parameters corresponding to each frame of original image acquired by the infrared thermal imaging equipment based on the 2 background templates.

And step 104, correcting each frame of original image acquired by the infrared camera based on the 2 background templates and the corresponding dynamic parameters to obtain a corrected image.

In summary, according to the infrared image correction method provided in the embodiment of the present invention, by obtaining the operating temperature of the infrared thermal imaging device, 2 background templates are screened from the plurality of pre-stored background templates, based on the 2 background templates, the dynamic parameter corresponding to each frame of original image obtained by the infrared thermal imaging device can be determined, and based on the dynamic parameter and the 2 background templates, the correction of each frame of original image obtained by the infrared thermal imaging device can be achieved.

Furthermore, in the infrared image correction method provided by the embodiment of the present invention, when an original image is corrected, the background templates are screened from the plurality of background templates stored in advance, so that only 2 background templates are required to participate in the correction of the original image, and all background templates are not required to participate in the correction of the original image, so that the calculation amount is small, the performance requirement on a processor in the infrared thermal imaging device is low, and the manufacturing cost of the infrared thermal imaging device is effectively reduced.

In an alternative implementation, an infrared thermal imaging apparatus includes: the infrared focal plane detector is used for acquiring images through the infrared thermal imaging equipment when the infrared thermal imaging equipment acquires the images. The operating temperature of the infrared focal plane detector reflects the operating temperature of the infrared thermal imaging device. The infrared thermal imaging device is at different working temperatures, when the infrared focal plane detector acquires the same image of the target object, the display effect of the image of the target object is possibly different, in order to enable the infrared focal plane detector to acquire the same image of the target object, the display effect of the image of the target object is as same as possible, different internal parameters of the infrared focal plane detector need to be configured according to different working temperatures, and the configuration of the internal parameters of the infrared thermal imaging device at different temperatures needs to be completed before the infrared thermal imaging device leaves a factory.

In an example, a temperature interval in which the infrared thermal imaging device can normally operate is divided, and different internal parameters are configured for the divided temperature interval. Optionally, the dividing mode may be equal-proportion dividing, that is, the length of each finally obtained interval is equal. For example, when the temperature range in which the infrared thermal imaging apparatus can normally operate is [ -20, 60], the temperature range may be divided into a low temperature range [ -20, 10 ], a medium temperature range [10, 40 ], and a high temperature range [40, 60], internal parameters of a corresponding set of infrared focal plane detectors may be configured for the three temperature ranges, respectively, and the configured internal parameters and the corresponding temperature ranges may be stored in the storage module of the infrared thermal imaging apparatus. It should be noted that, in the embodiment of the present invention, the temperature interval in which the infrared thermal imaging device can normally operate may be further divided in other dividing manners, but it is required to ensure that one temperature difference exists in the divided temperature interval, including all temperatures in the normal temperature interval, for example, the normal temperature interval is between [20 and 30], so that a phenomenon that different internal parameters are used when the infrared focal plane detector operates due to a change in the ambient temperature when the infrared thermal imaging device is used in a normal temperature environment subsequently is avoided. It should be noted that the temperatures in the temperature ranges in the examples of the present invention are all expressed in degrees centigrade (. degree. C.).

In the embodiment of the present invention, a plurality of background templates pre-stored in the infrared thermal imaging device are also stored before the infrared thermal imaging device leaves a factory, the background templates are images reflecting background noise of the infrared thermal imaging device, and the background templates can be used to correct the acquired infrared images after the infrared thermal imaging device leaves the factory. In an example, within a temperature range in which the infrared thermal imaging device can normally operate, a plurality of operating temperatures of the infrared thermal imaging device are simulated, and for each operating temperature, the infrared thermal imaging device is adopted to acquire an image of a target reference object having the same temperature as the operating temperature, wherein the image is a background template. For example, when the temperature range in which the infrared thermal imaging apparatus can normally operate is [ -20, 60], in the temperature range, a plurality of temperature points are selected, and are generally uniformly distributed in the temperature range [ -20, 60], for each temperature point, the temperature of the environment in which the infrared thermal imaging apparatus is located is simulated, so that the operating temperature of the infrared thermal imaging apparatus is the same as the temperature of the temperature point, the temperature of the target reference object is adjusted, so that the temperature of the target reference object is the same as the temperature of the temperature point, the image of the target reference object is acquired by using the infrared thermal imaging apparatus, and the image and the corresponding temperature information are stored in the infrared thermal imaging apparatus, for example, in a storage module in the infrared thermal imaging apparatus. Alternatively, the target reference object may be an object with relatively uniform radiation properties, for example a uniform radiation surface, on which a temperature regulating assembly may be arranged, by means of which the temperature of the object with relatively uniform radiation properties may be regulated. By way of example, the temperature conditioning assembly may include: heating member and cooling piece, the cooperation through heating member and cooling piece can realize the temperature adjustment of the object that will have relatively even radiation attribute for arbitrary temperature.

For an infrared focal plane detector with a response rate that increases with an increase in focal plane temperature (i.e., an operating temperature of the infrared thermal imaging device), the response rate of the infrared focal plane array detector in the infrared thermal imaging device is low when the operating temperature of the infrared thermal imaging device is low (e.g., less than or equal to 20 degrees celsius), and the response rate of the infrared focal plane array detector in the infrared thermal imaging device is high when the operating temperature of the infrared thermal imaging device is high (e.g., greater than 20 degrees celsius). That is, when the operating temperature of the infrared thermal imaging device is low and the operating temperature of the infrared thermal imaging device changes by the preset temperature, the variation of the gray scale value of the pixel in the image acquired by the infrared thermal imaging device is smaller than the variation of the gray scale value of the pixel in the image acquired by the infrared thermal imaging device when the operating temperature of the infrared thermal imaging device changes by the preset temperature and the operating temperature of the infrared thermal imaging device is high.

For an infrared focal plane detector with the response rate becoming smaller along with the increase of the focal plane temperature, when the working temperature of the infrared thermal imaging device is lower, the response rate of the infrared focal plane array detector in the infrared thermal imaging device is higher, and when the working temperature of the infrared thermal imaging device is higher, the response rate of the infrared focal plane array detector in the infrared thermal imaging device is lower.

When the plurality of background templates are obtained, if the infrared focal plane detector is a detector with a response rate which increases with the increase of the temperature of the focal plane, the absolute value of the temperature difference between any two adjacent temperature points selected when the temperature of the temperature points is low is greater than the absolute value of the temperature difference between any two adjacent temperature points selected when the temperature of the temperature points is high. By way of example, the plurality of background templates in the infrared thermal imaging device includes: the background templates in one background template group correspond to a plurality of first temperatures, the background templates in the other background template group correspond to a plurality of second temperatures, any one first temperature is lower than any one second temperature, when the first temperatures and the second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is larger than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures. Since the absolute value of the temperature difference between any two adjacent temperature points is large when the operating temperature of the infrared thermal imaging device is low, the number of background templates stored in the infrared thermal imaging device can be reduced appropriately.

If the infrared focal plane detector is a detector with the responsivity becoming smaller along with the temperature rise of the focal plane, the absolute value of the temperature difference between any two adjacent temperature points selected when the temperature of the temperature point is lower is smaller than the absolute value of the temperature difference between any two adjacent temperature points selected when the temperature of the temperature point is higher. By way of example, the plurality of background templates in the infrared thermal imaging device includes: when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is smaller than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an arrangement sequence according to the ascending order or the descending order of the temperatures. Since the absolute value of the temperature difference between any two adjacent temperature points is large when the operating temperature of the infrared thermal imaging device is high, the number of background templates stored in the infrared thermal imaging device can be reduced appropriately.

It should be noted that, in the embodiment of the present invention, the absolute value of the temperature difference between any two adjacent first temperatures and the absolute value of the difference between any two adjacent second temperatures are not specifically limited, and it only needs to be satisfied that the absolute value of the temperature difference between any two adjacent first temperatures is greater than the absolute value of the temperature difference between any two adjacent second temperatures.

By the method, the configuration of the internal parameters of the infrared focal plane detector and the acquisition of the plurality of background templates stored in the infrared thermal imaging device can be completed before the infrared thermal imaging device leaves a factory. After the infrared thermal imaging device leaves a factory, the infrared thermal imaging device can acquire an infrared image and display the infrared image after correcting the infrared image. The following example illustrates a method for correcting an infrared image acquired by an infrared thermal imaging apparatus.

Fig. 2 is a flowchart of another infrared image correction method provided in an embodiment of the present invention, where the method may include:

step 201, acquiring the working temperature of the infrared thermal imaging device when the infrared thermal imaging device works.

In an embodiment of the present invention, the focal plane temperature of the infrared focal plane array detector may be determined as the operating temperature of the infrared thermal imaging device. For example, a temperature sensor may be disposed at the periphery of an infrared focal plane array detector in an infrared thermal imaging device, and generally, the temperature sensor is disposed at a position away from the infrared focal plane array detector by a certain distance, and when the infrared thermal imaging device is in operation, the temperature sensor may acquire the focal plane temperature of the infrared focal plane array detector; or the focal plane temperature of the infrared focal plane array detector can be directly acquired through a pin of the infrared focal plane array detector. The focal plane temperature of the infrared focal plane array detector may be used to reflect the operating temperature of the infrared thermal imaging device.

Step 202, according to the working temperature, 2 background templates are screened from a plurality of pre-stored background templates.

In the embodiment of the present invention, through the above process of acquiring the plurality of background templates before the infrared thermal imaging device leaves the factory, it is possible to store the plurality of background templates in the infrared thermal imaging device in advance, where the plurality of background templates correspond to the plurality of temperatures one to one. After the working temperature of the infrared thermal imaging device is obtained in step 201, the infrared thermal imaging device may screen 2 background templates from a plurality of pre-stored background templates according to the working temperature, where the 2 background templates include a first background template whose corresponding temperature is greater than the working temperature and a second background template whose corresponding temperature is less than the working temperature. When the infrared image acquired by the infrared thermal imaging equipment is corrected subsequently, only the 2 background templates are needed to participate in correction, all background templates stored in the infrared thermal imaging equipment are not needed to participate in correction, the calculation amount when the infrared image is corrected is small, the requirement on the performance of a processor in the infrared thermal imaging equipment is low, and the cost of the infrared thermal imaging equipment is effectively reduced.

In the embodiment of the present invention, a relationship between the operating temperature, the temperature corresponding to the first background template, and the temperature corresponding to a third background template, in which the temperature corresponding to a background template other than the 2 background templates among the plurality of background templates is greater than the operating temperature, satisfies:

|T1-T0|<|T3-T0|;

wherein, T0 is the operating temperature of the infrared thermal imaging device, T1 is the temperature corresponding to the first background template, and T3 is the temperature corresponding to any one of the at least one third background template.

The relation among the working temperature, the temperature corresponding to the second background template and the temperature corresponding to a fourth background template, wherein the temperature corresponding to the fourth background template, except the 2 background templates, of the plurality of background templates is less than the working temperature satisfies the following conditions:

|T2-T0|<|T4-T0|;

wherein, T0 is an operating temperature of the infrared thermal imaging device, T2 is a temperature corresponding to the second background template, and T4 is a temperature corresponding to any one of the at least one fourth background template.

Illustratively, when the plurality of background templates includes: when a background template at 16 ℃, a background template at 19 ℃, a background template at 21 ℃ and a background template at 23 ℃ are equal, if the working temperature of the infrared thermal imaging device is 20 ℃, the first background template is the background template at 21 ℃, and the second background is the background template at 19 ℃.

And 203, determining dynamic parameters corresponding to each frame of original image acquired by the infrared thermal imaging device based on the 2 background templates.

In the embodiment of the present invention, the modes of obtaining the dynamic parameter corresponding to the 1 st frame of original image and obtaining the dynamic parameter corresponding to the M th frame of original image are different, where M is greater than or equal to 2, and the following embodiments schematically illustrate the two modes of obtaining the dynamic parameter respectively:

in an implementation manner, for the 1 st original image, the dynamic parameter corresponding to the 1 st original image may be calculated based on the temperatures corresponding to the 2 background templates. For example, the dynamic parameter corresponding to the 1 st frame of original image may be calculated based on a first dynamic parameter equation set, where the first dynamic parameter equation set is:

Figure BDA0001705336770000141

wherein m11、m21And c1Representing the corresponding dynamic parameter, t, of the original image of frame 1HIndicates the temperature, t, corresponding to the first background templateLIndicates the temperature, t, corresponding to the second background template0Indicating the operating temperature of the infrared thermal imaging device.

In a second implementation manner, for the mth frame original image, the following steps may be referred to in the manner of obtaining the dynamic parameters corresponding to the original image in step 203:

step A1, acquiring a plurality of effective pixel combinations in the corrected image of the M-1 frame.

For example, each effective pixel combination includes two adjacent pixels, and an absolute value of a difference between the gray values of the two adjacent pixels is smaller than or equal to a preset threshold. Generally, the infrared thermal imaging device needs to process the pixels one by one, and then the processing of the image can be completed, where the two adjacent pixels are obtained by dividing the infrared thermal imaging device according to the order of processing the pixels, for example, when the infrared thermal imaging device processes the pixels sequentially from left to right according to the row order, for the first row of pixels, the 1 st pixel and the 2 nd pixel are two adjacent pixels, and the 3 rd pixel and the 4 th pixel are two adjacent pixels, in the left to right order.

The preset threshold temperature is obtained based on the background template, and after the background template is obtained before the infrared thermal imaging device leaves the factory, the target preset threshold corresponding to each background template can be obtained and stored in the infrared thermal imaging device. When the target preset threshold value is obtained for each background template, the method can comprise the following substeps:

sub-step a11, a plurality of pixel combinations in the background template are obtained. The pixel combination is two adjacent pixels in the background template.

And a substep a12, calculating an absolute value of a difference between the gray values of the two pixels in each pixel combination to obtain a pixel difference value.

For example, after obtaining a plurality of pixel combinations in the background template, a pixel difference value of each pixel combination may be calculated.

And a substep A13, counting the number of pixel combinations with the same pixel difference value, and determining the pixel difference value with the largest number of pixel combinations as a target preset threshold value.

For example, after the pixel difference values of each group of pixel combinations are calculated, the number of combinations with the same pixel difference value may be counted, and the pixel difference value with the largest number of pixel combinations may be determined as the target preset threshold. In an alternative implementation, when counting the number of combinations with the same pixel difference, the statistics may be performed by using a histogram, for example, as shown in fig. 3, a histogram may be drawn according to the result of the statistics, where an ordinate of the histogram represents the number of combinations with the same pixel difference, and an abscissa represents a pixel difference, and a pixel difference corresponding to a peak value in the histogram may be determined as the target preset threshold, for example, the pixel difference 48 is determined as the target preset threshold.

The obtaining of the target preset threshold corresponding to each background template can be completed through the steps a11 to a 13.

It should be noted that, when the plurality of effective pixel combinations are obtained from the corrected image of the M-1 th frame, the effective pixel combinations are obtained based on the target preset threshold corresponding to the first background template.

Step A2, calculating the dynamic parameters corresponding to the M frame image based on the 2 background templates and the effective pixel combination.

For example, in the image corrected for M-1 frame, it is assumed that there are n effective pixel combinations, the pixel positions of two pixels in the i-th effective pixel combination of the n effective pixels are a and b, the gray-scale value at the pixel position a in the M-th original image is x (a), and the gray-scale value at the pixel position b is x (b), and the gray-scale value at the pixel position a after the M-th original image is corrected is y (a), and the gray-scale value at the pixel position b is y (b), the pixel difference of the effective pixel combination can be represented by a square difference D between y (a) and y (b), and the relationship between the square differences D, Y (a) and y (b) satisfies:

D=[Y(a)-Y(b)]2 (1)

according to the correction formula (which can refer to the corresponding contents in the subsequent steps 204 to 205), it can be obtained:

Figure BDA0001705336770000161

summing the pixel differences for all valid pixel combinations yields:

Figure BDA0001705336770000162

substituting the above formula (1) and formula (2) into formula (3), and applying the above formula to m1M、m2MAnd cMAfter the partial derivative is solved, a second dynamic parameter equation set can be obtained, and the dynamic parameter corresponding to the mth frame of original image is calculated based on the second dynamic parameter equation set, where the second dynamic parameter equation set is:

Figure BDA0001705336770000163

wherein m1M、m2MAnd cMRepresenting the dynamic parameter corresponding to the M frame original image, n representing the number of a plurality of effective pixel combinations, a and B representing the pixel position of the i group of effective pixel combinations respectively, X (a) representing the gray value of the pixel at the pixel position a in the M frame original image, X (B) representing the gray value of the pixel at the pixel position B in the M frame original image, BHRepresenting the gray value of a pixel in a first background template, BLRepresenting the gray values of the pixels in the second background template and Gain representing the Gain coefficient matrix.

And 204, determining the background noise corresponding to each frame of original image acquired by the infrared thermal imaging equipment based on the 2 background templates and the corresponding dynamic parameters.

In the embodiment of the present invention, for each frame of original image, the dynamic parameter corresponding to each frame of original image may be determined through step 203, and the background noise corresponding to each frame of original image may be determined based on 2 background templates and the corresponding dynamic parameters. For example, the background noise corresponding to the original image is calculated based on a background noise calculation formula, where the background noise calculation formula is:

offsetN(i,j)=m1N×BL(i,j)+m2N×BH(i,j)+cN

wherein (i, j) represents the pixel coordinate, offsetNM1 representing the corresponding background noise of the original image of the Nth frameN、m2NAnd cNRepresenting the dynamic parameter corresponding to the original image of the Nth frame, BHRepresenting the gray value of a pixel in a first background template, BLRepresenting the gray value of the pixel in the second background template, N ≧ 1.

Step 205, correcting the original image based on the gray value of the pixel in the original image and the corresponding background noise to obtain a corrected image.

In the embodiment of the present invention, after the corresponding background noise of each frame of image is calculated in step 204, the original image may be corrected based on the gray-level values of the pixels in the original image and the corresponding background noise of the original image. For example, the original image may be corrected based on a correction formula, which is:

ImgN(i,j)=Gain(i,j)×[outN(i,j)-offseN(i,j)];

wherein ImgNRepresenting the gray value, out, of the pixel in the corrected image of the Nth frameNAnd representing the gray value of a pixel in the original image of the Nth frame, and Gain representing a Gain coefficient matrix.

The Gain coefficient matrix Gain is also stored in the infrared thermal imaging apparatus in advance. The Gain coefficient matrix Gain is also obtained by obtaining the Gain coefficient matrix before the infrared thermal imaging device leaves the factory, for example, at a certain fixed temperature, the infrared thermal imaging device may obtain an image of a target reference object with a lower temperature and an image of a target reference object with a higher temperature, and the Gain coefficient matrix Gain is obtained by calculating through a Gain coefficient matrix calculation formula, where the Gain coefficient matrix calculation formula is:

where VBH represents the grayscale value of the pixel of the image of the target reference object with higher temperature, VBL represents the grayscale value of the pixel of the image of the target reference object with lower temperature, mean (VBH) represents the average of the grayscale values of the pixels of the image of the target reference object with higher temperature, and mean (VBL) represents the average of the grayscale values of the pixels of the image of the target reference object with lower temperature.

It should be added that, for each frame of original image, m +1 dynamic parameters need to be acquired, and each frame of original image is corrected based on the m +1 dynamic parameters and 2 background templates, in the above embodiment, m is 2 as an example to schematically illustrate, and for m is 3 or m is 4, the principle of correcting each frame of original image may refer to the principle of correcting each frame of original image when m is 2, which is not described in detail in the embodiments of the present invention.

After the above steps 201 to 205, the original image acquired by the infrared thermal imaging device may be corrected, so that the display quality of the infrared image displayed by the infrared thermal imaging device is high.

It should be noted that, the sequence of the steps of the infrared image correction method provided in the embodiment of the present invention may be appropriately adjusted, and the steps may also be increased or decreased according to the circumstances, and any method that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention shall be included in the protection scope of the present invention, and therefore, no further description is given.

In summary, according to the infrared image correction method provided in the embodiment of the present invention, by obtaining the operating temperature of the infrared thermal imaging device, 2 background templates are screened from the plurality of pre-stored background templates, based on the 2 background templates, the dynamic parameter corresponding to each frame of original image obtained by the infrared thermal imaging device can be determined, and based on the dynamic parameter and the 2 background templates, the correction of each frame of original image obtained by the infrared thermal imaging device can be realized.

Furthermore, when the original image is corrected, the background templates are screened from the plurality of pre-stored background templates, so that only 2 background templates are needed to participate in the correction of the original image, and all background templates are not needed to participate in the correction of the original image, so that the calculation amount is small, the performance requirement on a processor in the infrared thermal imaging device is low, and the manufacturing cost of the infrared thermal imaging device is effectively reduced.

An embodiment of the present invention further provides an apparatus for correcting an infrared image, where the apparatus is applied to an infrared thermal imaging device, as shown in fig. 4, fig. 4 is a block diagram of the apparatus for correcting an infrared image according to the embodiment of the present invention, and the apparatus 400 for correcting an infrared image may include:

the obtaining module 401 is configured to obtain an operating temperature of the infrared thermal imaging apparatus when the infrared thermal imaging apparatus operates.

A screening module 402, configured to screen 2 background templates from a plurality of pre-stored background templates according to a working temperature, where the background templates correspond to a plurality of temperatures one to one, the 2 background templates include a first background template whose corresponding temperature is higher than the working temperature, and a second background template whose corresponding temperature is lower than the working temperature, and the background template is an image reflecting background noise of the infrared thermal imaging apparatus.

The determining module 403 is configured to determine, based on the 2 background templates, a dynamic parameter corresponding to each frame of the original image acquired by the infrared thermal imaging apparatus.

And a correcting module 404, configured to correct, for each frame of original image acquired by the infrared thermal imaging apparatus, the original image based on the 2 background templates and the corresponding dynamic parameters, so as to obtain a corrected image.

In summary, the infrared image correction apparatus provided in the embodiment of the present invention obtains the operating temperature of the infrared thermal imaging device, screens 2 background templates from the plurality of background templates stored in advance, determines the dynamic parameter corresponding to each frame of the original image obtained by the infrared thermal imaging device based on the 2 background templates, and corrects each frame of the original image obtained by the infrared thermal imaging device based on the dynamic parameter and the 2 background templates.

Furthermore, when the original image is corrected, the background templates are screened from the plurality of pre-stored background templates, so that only 2 background templates are needed to participate in the correction of the original image, and all background templates are not needed to participate in the correction of the original image, so that the calculation amount is small, the performance requirement on a processor in the infrared thermal imaging device is low, and the manufacturing cost of the infrared thermal imaging device is effectively reduced.

Optionally, referring to fig. 5, fig. 5 is a block diagram of a correction module 404 according to an embodiment of the present invention, where the correction module 404 may include:

a first determination unit 4041, configured to determine a background noise corresponding to the original image based on the 2 background templates and the corresponding dynamic parameters.

The correcting unit 4042 is configured to correct the original image based on the gray-level values of the pixels in the original image and the corresponding background noise, so as to obtain a corrected image.

Optionally, the first determining unit 4041 is configured to:

calculating the background noise corresponding to the original image based on a background noise calculation formula, wherein the background noise calculation formula is as follows:

offsetN(i,j)=m1N×BL(i,j)+m2N×BH(i,j)+cN

wherein (i, j) represents the pixel coordinate, offsetNM1 representing the corresponding background noise of the original image of the Nth frameN、m2NAnd cNRepresenting the dynamic parameter corresponding to the original image of the Nth frame, BHRepresenting the gray value of a pixel in a first background template, BLRepresenting the gray value of the pixel in the second background template, N ≧ 1.

Optionally, the correcting unit 4042 is configured to:

correcting the original image based on a correction formula, wherein the correction formula is as follows:

ImgN(i,j)=Gain(i,j)×[outN(i,j)-offsetN(i,j)];

wherein ImgNRepresenting the gray value, out, of the pixel in the corrected image of the Nth frameNAnd representing the gray value of a pixel in the original image of the Nth frame, and Gain representing a Gain coefficient matrix.

Optionally, referring to fig. 6, fig. 6 is a block diagram of a determining module 403 according to an embodiment of the present invention, where the determining module 403 may include:

the first calculating unit 4031 is configured to calculate, for the 1 st frame original image, a dynamic parameter corresponding to the 1 st frame original image based on the temperatures corresponding to the 2 background templates.

An obtaining unit 4032, configured to, for the mth frame original image, obtain, in the image after the M-1 frame correction, multiple effective pixel combinations, where each effective pixel combination includes two adjacent pixels, and an absolute value of a difference between gray values of the two adjacent pixels is less than or equal to a preset threshold.

A second calculating unit 4033, configured to calculate, based on the 2 background templates and the multiple effective pixel combinations, dynamic parameters corresponding to the mth frame image.

Optionally, the first calculating unit 4031 is configured to:

calculating the dynamic parameters corresponding to the 1 st frame of original image based on a first dynamic parameter equation set, wherein the first dynamic parameter equation set comprises:

Figure BDA0001705336770000201

wherein m11、m21And c1Representing the corresponding dynamic parameter, t, of the original image of frame 1HIndicates the temperature, t, corresponding to the first background templateLIndicates the temperature, t, corresponding to the second background template0Indicating the operating temperature of the infrared thermal imaging device.

Optionally, the second computing unit 4032 is configured to:

calculating the dynamic parameters corresponding to the original image of the Mth frame based on a second dynamic parameter equation set, wherein the second dynamic parameter equation set is as follows:

Figure BDA0001705336770000202

wherein m1M、m2MAnd cMRepresenting the dynamic parameter corresponding to the M frame original image, n representing the number of a plurality of effective pixel combinations, a and B representing the pixel position of the i group of effective pixel combinations respectively, X (a) representing the gray value of the pixel at the pixel position a in the M frame original image, X (B) representing the gray value of the pixel at the pixel position B in the M frame original image, BHRepresenting the gray value of a pixel in a first background template, BLRepresenting the gray values of the pixels in the second background template.

Optionally, the obtaining module includes:

and the second determination unit is used for determining the focal plane temperature of the infrared focal plane array detector as the working temperature of the infrared thermal imaging equipment.

Optionally, the infrared thermal imaging device includes an infrared focal plane array detector, the infrared focal plane array detector is a detector whose response rate increases with an increase in operating temperature, and the pre-stored background templates include: when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is larger than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an ascending or descending arrangement sequence according to the temperature.

Optionally, the infrared thermal imaging device includes an infrared focal plane array detector, the infrared focal plane array detector is a detector whose response rate decreases with an increase in operating temperature, and the pre-stored background templates include: when the plurality of first temperatures and the plurality of second temperatures are arranged according to a target arrangement sequence, the absolute value of the temperature difference between any two adjacent first temperatures is smaller than the absolute value of the temperature difference between any two adjacent second temperatures, and the target arrangement sequence is an ascending or descending arrangement sequence according to the temperature.

In summary, the infrared image correction apparatus provided in the embodiment of the present invention obtains the operating temperature of the infrared thermal imaging device, screens 2 background templates from the plurality of background templates stored in advance, determines the dynamic parameter corresponding to each frame of the original image obtained by the infrared thermal imaging device based on the 2 background templates, and corrects each frame of the original image obtained by the infrared thermal imaging device based on the dynamic parameter and the 2 background templates.

Furthermore, when the original image is corrected, the background templates are screened from the plurality of pre-stored background templates, so that only 2 background templates are needed to participate in the correction of the original image, and all background templates are not needed to participate in the correction of the original image, so that the calculation amount is small, the performance requirement on a processor in the infrared thermal imaging device is low, and the manufacturing cost of the infrared thermal imaging device is effectively reduced.

It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

An embodiment of the present invention further provides a computer device, where the computer device may be the above infrared thermal imaging device, and the computer device includes: at least one processor; and at least one memory;

wherein the at least one memory stores one or more programs;

at least one processor for executing the program stored in the at least one memory to implement the method for correcting the infrared image shown in fig. 1 or fig. 2.

An embodiment of the present invention further provides a storage medium, which is a non-volatile storage medium, and code instructions are stored in the storage medium and executed by a processor to perform the infrared image correction method shown in fig. 1 or fig. 2.

It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种便于精准研究电磁感应加热阶段的温度测试装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!