An infrared detection result correction method, device, electronic device and storage medium

By acquiring grayscale images and ambient temperature from an infrared detector, and using pre-calibrated temperature drift coefficients and background data for correction, the temperature drift problem caused by baffle blockage is solved, ensuring detection continuity, reducing power consumption, and extending service life.

CN122084126APending Publication Date: 2026-05-26HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU MICROIMAGE SOFTWARE CO LTD
Filing Date
2024-11-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing infrared detector temperature drift correction methods rely on baffles, which can lead to temporary blindness and increased power consumption, affecting the continuity of the detection process and its lifespan.

Method used

By acquiring the grayscale image of the infrared detector and the ambient temperature, and using a pre-calibrated set of temperature drift coefficients and background data, the temperature drift amount and reference grayscale value of each pixel are calculated and corrected to avoid obstruction by the baffle.

Benefits of technology

This achieves the goal of reducing the power consumption of infrared detectors and extending their service life without affecting the continuity of the detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122084126A_ABST
    Figure CN122084126A_ABST
Patent Text Reader

Abstract

This application provides an infrared detection result correction method, apparatus, electronic device, and storage medium. The method includes: acquiring a grayscale image generated from the thermal radiation signal received by the photosensitive area of ​​the infrared detector and the corresponding ambient temperature; determining a target temperature drift coefficient set and target background data corresponding to the ambient temperature based on a pre-calibrated correspondence between temperature, temperature drift coefficient set, and background data; for each pixel in the grayscale image, determining the corresponding temperature drift amount and reference grayscale value based on the target temperature drift coefficient set and target background data; and correcting the grayscale value of each pixel based on the temperature drift amount and reference grayscale value. By using pre-calibrated data and the temperature during infrared detection, the temperature drift coefficient and reference grayscale value of each pixel are determined, thereby correcting the grayscale value of each pixel to eliminate the influence of temperature drift without a baffle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of infrared detection technology, and in particular to an infrared detection result correction method, device, electronic device and storage medium. Background Technology

[0002] Infrared detectors, widely used in imaging and temperature measurement, work by first converting the received thermal radiation signal into an electrical signal through a built-in thermistor, and then further converting the electrical signal into output signals such as grayscale images through a built-in processing algorithm, thereby realizing the function of infrared detection.

[0003] Infrared detectors' thermistors are extremely sensitive to heat sources. When the ambient temperature of the infrared detector changes, its output signal drifts, a phenomenon known as temperature drift. Current temperature drift correction methods involve using a uniform reference surface (i.e., a baffle) to block the infrared detector at a fixed frequency. During the blocking period, the detector collects the output signal at that time as a reference signal. During the unblocked period, the detector uses the reference signal collected during the blocking period to correct the currently collected output signal, thus eliminating the effects of temperature drift.

[0004] However, this method of temperature drift correction relying on baffles has the following problems: when the baffle blocks the infrared detector, it will cause a brief blindness, thus affecting the continuity of the detection process. In addition, frequent blocking operations will also affect the power consumption and service life of the infrared detector. Summary of the Invention

[0005] The purpose of this application is to provide an infrared detection result correction method, apparatus, electronic device, and storage medium to achieve temperature drift correction without relying on a baffle plate. The specific technical solution is as follows:

[0006] In a first aspect, embodiments of this application provide an infrared detection result correction method, the method comprising:

[0007] A first grayscale image and the corresponding ambient temperature are obtained, wherein the first grayscale image is a grayscale image generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal.

[0008] In the pre-defined correspondence between temperature, temperature drift coefficient set and background data, the target temperature drift coefficient set and target background data corresponding to the ambient temperature are determined, wherein the target temperature drift coefficient set includes: the temperature drift coefficient corresponding to each pixel in the target background data;

[0009] For each first pixel in the first grayscale image, the temperature drift coefficient corresponding to the first pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the first pixel is calculated based on the temperature drift coefficient, and the reference grayscale value corresponding to the first pixel is determined in the target background data.

[0010] Based on the temperature drift and reference gray value of each first pixel, the gray value of each first pixel is corrected to obtain the second grayscale image.

[0011] Optionally, the correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data includes: each temperature range and its corresponding temperature drift coefficient set and background data;

[0012] The step of determining the target temperature drift coefficient set and target background data corresponding to the ambient temperature from the pre-calibrated correspondence between the temperature, temperature drift coefficient set and background data includes:

[0013] Within each temperature range, a target temperature range including the ambient temperature is determined, and the set of temperature drift coefficients and background data corresponding to the target temperature range are determined as the target temperature drift coefficient set and target background data corresponding to the ambient temperature.

[0014] Optionally, calculating the temperature drift amount corresponding to the first pixel based on the temperature drift coefficient includes:

[0015] The product of the temperature drift coefficient and the temperature difference corresponding to the first pixel is calculated as the temperature drift amount corresponding to the first pixel, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0016] Optionally, before correcting the grayscale value of each first pixel based on the temperature drift and reference grayscale value corresponding to each first pixel, the method further includes:

[0017] A third grayscale image is obtained, wherein the third grayscale image is a grayscale image generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector, and the time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal.

[0018] Based on the target temperature drift coefficient set and the target background data, the gray values ​​of each second pixel in the third grayscale image are corrected to obtain the fourth grayscale image;

[0019] Based on the pre-established correspondence between infrared detector types and image noise types, determine the target image noise type corresponding to the type of the target infrared detector;

[0020] Based on the fourth grayscale image, a set of noise parameters corresponding to the noise type of the target image is determined, wherein the set of noise parameters includes: noise parameters corresponding to each pixel in the first grayscale image;

[0021] The step of correcting the grayscale value of each first pixel based on the temperature drift and reference grayscale value of each first pixel includes:

[0022] The grayscale value of each first pixel is corrected based on the noise parameters, temperature drift, and reference grayscale value corresponding to each first pixel.

[0023] Optionally, the step of correcting the grayscale values ​​of each second pixel in the third grayscale image based on the target temperature drift coefficient set and the target background data to obtain the fourth grayscale image includes:

[0024] For each second pixel in the third grayscale image, the temperature drift coefficient corresponding to the second pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the second pixel is calculated based on the temperature drift coefficient, and the reference grayscale value corresponding to the second pixel is determined in the target background data.

[0025] Based on the temperature drift and reference gray value of each second pixel, the gray value of each second pixel is corrected to obtain the fourth grayscale image.

[0026] Optionally, calculating the temperature drift amount corresponding to the second pixel based on the temperature drift coefficient includes:

[0027] The product of the temperature drift coefficient and the temperature difference corresponding to the second pixel is calculated as the temperature drift amount corresponding to the second pixel, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0028] Optionally, before determining the reference grayscale value corresponding to the first pixel in the target background data, the method further includes:

[0029] For each second pixel in the third grayscale image, a third pixel corresponding to the second pixel is determined in the target background data, and the difference in grayscale value between the second pixel and the third pixel is calculated. The second pixel and the third pixel are symmetrical about the boundary line between the photosensitive area and the non-photosensitive area. The third grayscale image is a grayscale image generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector. The time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal.

[0030] The average of the obtained differences is used as the background data correction amount;

[0031] For each pixel in the target background data corresponding to the photosensitive area, the reference gray value of the pixel is updated to the difference between the gray value of the pixel and the background data correction amount;

[0032] Determining the reference grayscale value corresponding to the first pixel in the target background data includes:

[0033] Among the updated reference gray values ​​included in the target baseline data, the reference gray value corresponding to the first pixel is determined.

[0034] Optionally, after correcting the grayscale value of each first pixel based on the temperature drift and reference grayscale value corresponding to each first pixel to obtain a second grayscale image, the method further includes:

[0035] For each fourth pixel in the second grayscale image, the gain correction coefficient corresponding to the fourth pixel is determined from a pre-calibrated set of gain correction coefficients, and the product between the gain correction coefficient corresponding to the fourth pixel and the grayscale value of the fourth pixel is calculated as the corrected grayscale value of the fourth pixel to obtain the fifth grayscale image. The set of gain correction coefficients includes the gain correction coefficients corresponding to each pixel in the grayscale image acquired by the target infrared detector.

[0036] Optionally, the set of gain correction coefficients may be calibrated as follows:

[0037] A first calibration grayscale image and a second calibration grayscale image are obtained. The first calibration grayscale image is generated based on a first calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a first temperature. The first calibration thermal radiation signal is emitted by a uniformly radiating surface at the first temperature. The second calibration grayscale image is generated based on a second calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a second temperature. The second calibration thermal radiation signal is emitted by a uniformly radiating surface at the second temperature. The first temperature and the second temperature are two temperatures within the operating temperature range of the calibration infrared detector.

[0038] Calculate the average gray level of each pixel in the first calibrated grayscale image to obtain the first average gray level, and calculate the average gray level of each pixel in the second calibrated grayscale image to obtain the second average gray level;

[0039] For every two pixels at the same position in the first and second calibration grayscale images, the ratio between the first grayscale difference and the second grayscale difference corresponding to the two pixels is calculated as the gain correction coefficient at that position. The first grayscale difference is the difference between the first grayscale average value and the second grayscale average value, and the second grayscale difference is the difference between the grayscale values ​​of the two pixels.

[0040] Optionally, the correspondence between the temperature, temperature drift coefficient set, and background data can be calibrated in the following manner:

[0041] The temperature control device is controlled to adjust the internal temperature of the temperature control device according to a preset temperature change rate, and the calibrated infrared detector installed inside the temperature control device is controlled to collect data from the radiation uniform surface installed inside the temperature control device according to a preset temperature interval, so as to obtain various background data.

[0042] For each pre-defined temperature range, perform the following operations to determine the set of temperature drift coefficients and background data corresponding to that temperature range:

[0043] One of the background data collected by the calibrated infrared detector within the temperature range is determined as the background data corresponding to that temperature range.

[0044] Among the background data collected by the calibrated infrared detector within this temperature range, the lowest relative low temperature background data and the highest relative high temperature background data are determined.

[0045] For every two first-class pixels at the same position in the relatively low temperature background data and the relatively high temperature background data, a target difference between the grayscale difference between the two first-class pixels and the overall grayscale difference is calculated. The ratio between the target difference and the temperature difference of the temperature range is then calculated as the temperature drift coefficient corresponding to the pixel at that position in the background data corresponding to the temperature range. The overall grayscale difference is the average difference between the grayscale values ​​of the first-class pixels in the relatively low temperature background data and the grayscale values ​​of the first-class pixels in the relatively high temperature background data. The first-class pixels are the pixels corresponding to the photosensitive area among all the pixels included in the background data.

[0046] For every two second-class pixels that are in the same position in the relatively low temperature background data and the relatively high temperature background data, the ratio between the grayscale difference between the two second-class pixels and the temperature difference of the temperature range is calculated, which is used as the temperature drift coefficient of the pixel at that position in the background data corresponding to the temperature range. The second-class pixels are the pixels that correspond to the non-photosensitive area among the pixels included in the background data.

[0047] Based on the temperature drift coefficient of each pixel in the background data corresponding to the temperature range, a set of temperature drift coefficients corresponding to the temperature range is generated.

[0048] Secondly, embodiments of this application provide an infrared detection result correction device, the device comprising:

[0049] The first acquisition module is used to acquire a first grayscale image and the ambient temperature corresponding to the first grayscale image, wherein the first grayscale image is a grayscale image generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal.

[0050] The calibration data query module is used to determine the target temperature drift coefficient set and target background data corresponding to the ambient temperature in the correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data, wherein the target temperature drift coefficient set includes: the temperature drift coefficient corresponding to each pixel in the target background data;

[0051] The correction parameter determination module is used to determine the temperature drift coefficient corresponding to each first pixel in the first grayscale image from the target temperature drift coefficient set, calculate the temperature drift amount corresponding to the first pixel based on the temperature drift coefficient, and determine the reference grayscale value corresponding to the first pixel in the target background data.

[0052] The first correction module is used to correct the gray value of each first pixel based on the temperature drift and reference gray value corresponding to each first pixel, so as to obtain the second grayscale image.

[0053] Optionally, the correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data includes: each temperature range and its corresponding temperature drift coefficient set and background data;

[0054] The calibration data query module is specifically used to determine the target temperature range, which includes the ambient temperature, in each temperature range, and to determine the set of temperature drift coefficients and background data corresponding to the target temperature range as the set of target temperature drift coefficients and target background data corresponding to the ambient temperature.

[0055] Optionally, the correction parameter determination module is specifically used to calculate the product between the temperature drift coefficient and the temperature difference corresponding to the first pixel point, as the temperature drift amount corresponding to the first pixel point, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0056] Optionally, the device further includes:

[0057] The second acquisition module is used to acquire a third grayscale image, wherein the third grayscale image is a grayscale image generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector, and the time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal.

[0058] The second correction module is used to correct the gray values ​​of each second pixel in the third grayscale image based on the target temperature drift coefficient set and the target background data, so as to obtain the fourth grayscale image.

[0059] The noise type determination module is used to determine the target graphic noise type corresponding to the type of the target infrared detector based on a pre-established correspondence between infrared detector types and graphic noise types.

[0060] The noise parameter set determination module is used to determine the noise parameter set corresponding to the noise type of the target image based on the fourth grayscale image, wherein the noise parameter set includes: the noise parameters corresponding to each pixel in the first grayscale image;

[0061] The first correction module is specifically used to correct the grayscale value of each first pixel based on the noise parameters, temperature drift, and reference grayscale value corresponding to each first pixel.

[0062] Optionally, the second correction module includes:

[0063] The correction parameter determination unit is used to determine the temperature drift coefficient corresponding to the second pixel in the target temperature drift coefficient set for each second pixel in the third grayscale image, calculate the temperature drift amount corresponding to the second pixel based on the temperature drift coefficient, and determine the reference grayscale value corresponding to the second pixel in the target background data.

[0064] The correction unit is used to correct the gray value of each second pixel point according to the temperature drift amount and reference gray value corresponding to each second pixel point, so as to obtain the fourth gray value image.

[0065] Optionally, the correction parameter determination unit is specifically used to calculate the product between the temperature drift coefficient and the temperature difference corresponding to the second pixel point, as the temperature drift amount corresponding to the second pixel point, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0066] Optionally, the device further includes:

[0067] The grayscale difference calculation module is used to determine the corresponding third pixel in the target background data for each second pixel in the third grayscale image, and to calculate the difference in grayscale value between the second pixel and the third pixel. The second pixel and the third pixel are symmetrical about the boundary line between the photosensitive area and the non-photosensitive area. The third grayscale image is generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector. The time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal.

[0068] The background data correction determination module is used to calculate the average of the obtained differences as the background data correction amount;

[0069] The background data correction module is used to update the reference gray value of each pixel in the target background data to the difference between the gray value of the pixel and the background data correction amount.

[0070] The correction parameter determination module is specifically used to determine the reference gray value corresponding to the first pixel point from among the updated reference gray values ​​included in the target background data output by the background data correction module.

[0071] Optionally, the device further includes:

[0072] The second correction module is used to determine the gain correction coefficient corresponding to each fourth pixel in the second grayscale image output by the first correction module from a pre-calibrated set of gain correction coefficients, and calculate the product between the gain correction coefficient corresponding to the fourth pixel and the grayscale value of the fourth pixel as the corrected grayscale value of the fourth pixel to obtain a fifth grayscale image. The gain correction coefficient set includes the gain correction coefficients corresponding to each pixel in the grayscale image acquired by the target infrared detector.

[0073] Optionally, the set of gain correction coefficients may be calibrated as follows:

[0074] A first calibration grayscale image and a second calibration grayscale image are obtained. The first calibration grayscale image is generated based on a first calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a first temperature. The first calibration thermal radiation signal is emitted by a uniformly radiating surface at the first temperature. The second calibration grayscale image is generated based on a second calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a second temperature. The second calibration thermal radiation signal is emitted by a uniformly radiating surface at the second temperature. The first temperature and the second temperature are two temperatures within the operating temperature range of the calibration infrared detector.

[0075] Calculate the average gray level of each pixel in the first calibrated grayscale image to obtain the first average gray level, and calculate the average gray level of each pixel in the second calibrated grayscale image to obtain the second average gray level;

[0076] For every two pixels at the same position in the first and second calibration grayscale images, the ratio between the first grayscale difference and the second grayscale difference corresponding to the two pixels is calculated as the gain correction coefficient at that position. The first grayscale difference is the difference between the first grayscale average value and the second grayscale average value, and the second grayscale difference is the difference between the grayscale values ​​of the two pixels.

[0077] Optionally, the correspondence between the temperature, temperature drift coefficient set, and background data can be calibrated in the following manner:

[0078] The temperature control device is controlled to adjust the internal temperature of the temperature control device according to a preset temperature change rate, and the calibrated infrared detector installed inside the temperature control device is controlled to collect data from the radiation uniform surface installed inside the temperature control device according to a preset temperature interval, so as to obtain various background data.

[0079] For each pre-defined temperature range, perform the following operations to determine the set of temperature drift coefficients and background data corresponding to that temperature range:

[0080] One of the background data collected by the calibrated infrared detector within the temperature range is determined as the background data corresponding to that temperature range.

[0081] Among the background data collected by the calibrated infrared detector within this temperature range, the lowest relative low temperature background data and the highest relative high temperature background data are determined.

[0082] For every two first-class pixels at the same position in the relatively low temperature background data and the relatively high temperature background data, a target difference between the grayscale difference between the two first-class pixels and the overall grayscale difference is calculated. The ratio between the target difference and the temperature difference of the temperature range is then calculated as the temperature drift coefficient corresponding to the pixel at that position in the background data corresponding to the temperature range. The overall grayscale difference is the average difference between the grayscale values ​​of the first-class pixels in the relatively low temperature background data and the grayscale values ​​of the first-class pixels in the relatively high temperature background data. The first-class pixels are the pixels corresponding to the photosensitive area among all the pixels included in the background data.

[0083] For every two second-class pixels that are in the same position in the relatively low temperature background data and the relatively high temperature background data, the ratio between the grayscale difference between the two second-class pixels and the temperature difference of the temperature range is calculated, which is used as the temperature drift coefficient of the pixel at that position in the background data corresponding to the temperature range. The second-class pixels are the pixels that correspond to the non-photosensitive area among the pixels included in the background data.

[0084] Based on the temperature drift coefficient of each pixel in the background data corresponding to the temperature range, a set of temperature drift coefficients corresponding to the temperature range is generated.

[0085] Thirdly, embodiments of this application provide an electronic device, including:

[0086] Memory, used to store computer programs;

[0087] When a processor executes a program stored in memory, it implements any of the methods described in the first aspect above.

[0088] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described in the first aspect above.

[0089] Beneficial effects of the embodiments in this application:

[0090] In the solution provided in this application embodiment, the electronic device can acquire a first grayscale image and the corresponding ambient temperature. The first grayscale image is generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal. In a pre-defined correspondence between temperature, temperature drift coefficient set, and background data, a target temperature drift coefficient set and target background data corresponding to the ambient temperature are determined. The target temperature drift coefficient set includes the temperature drift coefficient corresponding to each pixel in the target background data. For each first pixel in the first grayscale image, the temperature drift coefficient corresponding to the first pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the first pixel is calculated based on the temperature drift coefficient. A reference grayscale value corresponding to the first pixel is also determined in the target background data. Based on the temperature drift amount and reference grayscale value corresponding to each first pixel, the grayscale value of each first pixel is corrected to obtain a second grayscale image. The solution provided in this application obtains a first grayscale image generated by an infrared detector and its corresponding ambient temperature. Utilizing the pre-calibrated correspondence between temperature, temperature drift coefficient set, and background data, it determines the temperature drift coefficient and reference grayscale value for each pixel. Thus, without relying on a baffle, it corrects the grayscale value of each pixel using its temperature drift coefficient and reference grayscale value to eliminate the influence of temperature drift, ultimately obtaining a corrected second grayscale image. Furthermore, since the solution provided in this application avoids using a baffle to obstruct the infrared detector, it ensures that the continuity of the detection process is not affected. Compared to infrared detectors using baffles, the solution provided in this application also reduces the power consumption of the infrared detector and increases its lifespan.

[0091] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0092] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0093] Figure 1 This is a schematic flowchart of an infrared detection result correction method provided in an embodiment of this application;

[0094] Figure 2 For based on Figure 1 The diagram shown illustrates a scenario where a region is set within a photosensitive area.

[0095] Figure 3For based on Figure 1 A schematic diagram illustrating the changing trend of sensor parameters in one embodiment;

[0096] Figure 4 For based on Figure 3 A schematic diagram illustrating a reference background variation trend in the illustrated embodiment;

[0097] Figure 5 For based on Figure 1 A schematic diagram of a specific process for correcting infrared detection results in the embodiment shown;

[0098] Figure 6 For based on Figure 5 A schematic diagram illustrating a specific process for determining a set of noise parameters in the embodiment shown.

[0099] Figure 7 For based on Figure 1 A schematic flowchart of a background data correction method according to the embodiment shown;

[0100] Figure 8 For based on Figure 7 A schematic diagram illustrating pixel symmetry in the illustrated embodiment;

[0101] Figure 9 For based on Figure 1 A schematic diagram of a specific process for correcting infrared detection results in the embodiment shown;

[0102] Figure 10 For based on Figure 1 The illustrated embodiment is a flowchart of a gain coefficient calibration method;

[0103] Figure 11 For based on Figure 1 The diagram illustrates the correction effect of infrared detection results in the embodiment shown.

[0104] Figure 12 This is a schematic diagram of the infrared detection result correction device provided in the embodiments of this application;

[0105] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0106] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0107] To achieve temperature drift correction without relying on baffles, this application provides an infrared detection result correction method, apparatus, electronic device, computer-readable storage medium, and computer program product. The infrared detection result correction method provided in this application is described below.

[0108] The infrared detection result correction method provided in this application embodiment can be applied to any electronic device that needs to correct the detection results of the infrared detector. For example, it can be the infrared detector itself, or a computer, server, etc. connected to the infrared detector. No specific limitation is made here. For clarity, it will be referred to as an electronic device below.

[0109] like Figure 1 As shown, an infrared detection result correction method includes:

[0110] S101, obtain the first grayscale image and the corresponding ambient temperature.

[0111] The first grayscale image is generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal.

[0112] S102, in the pre-calibrated correspondence between temperature, temperature drift coefficient set and background data, determine the target temperature drift coefficient set and target background data corresponding to the ambient temperature.

[0113] The target temperature drift coefficient set includes the temperature drift coefficient corresponding to each pixel in the target background data.

[0114] S103, for each first pixel in the first grayscale image, determine the temperature drift coefficient corresponding to the first pixel in the target temperature drift coefficient set, calculate the temperature drift amount corresponding to the first pixel based on the temperature drift coefficient, and determine the reference grayscale value corresponding to the first pixel in the target background data.

[0115] S104, based on the temperature drift and reference gray value corresponding to each first pixel, correct the gray value of each first pixel to obtain the second grayscale image.

[0116] In the solution provided in this application embodiment, the electronic device can acquire a first grayscale image and the corresponding ambient temperature. The first grayscale image is generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal. In a pre-defined correspondence between temperature, temperature drift coefficient set, and background data, a target temperature drift coefficient set and target background data corresponding to the ambient temperature are determined. The target temperature drift coefficient set includes the temperature drift coefficient corresponding to each pixel in the target background data. For each first pixel in the first grayscale image, the temperature drift coefficient corresponding to the first pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the first pixel is calculated based on the temperature drift coefficient. A reference grayscale value corresponding to the first pixel is also determined in the target background data. Based on the temperature drift amount and reference grayscale value corresponding to each first pixel, the grayscale value of each first pixel is corrected to obtain a second grayscale image. The solution provided in this application obtains a first grayscale image generated by an infrared detector and its corresponding ambient temperature. Utilizing the pre-calibrated correspondence between temperature, temperature drift coefficient set, and background data, it determines the temperature drift coefficient and reference grayscale value for each pixel. Thus, without relying on a baffle, it corrects the grayscale value of each pixel using its temperature drift coefficient and reference grayscale value to eliminate the influence of temperature drift, ultimately obtaining a corrected second grayscale image. Furthermore, since the solution provided in this application avoids using a baffle to obstruct the infrared detector, it ensures that the continuity of the detection process is not affected. Compared to infrared detectors using baffles, the solution provided in this application also reduces the power consumption of the infrared detector and increases its lifespan.

[0117] This section first introduces the calibration method for the correspondence between the temperature, temperature drift coefficient set, and background data in the embodiments of this application. For each infrared detector, when calibrating the correspondence between the temperature, temperature drift coefficient set, and background data corresponding to that infrared detector, it can be used as a calibration infrared detector. Then, based on the calibration infrared detector, the following calibration method is performed to calibrate and obtain the correspondence between the temperature, temperature drift coefficient set, and background data corresponding to that infrared detector:

[0118] 1. Temperature control and data acquisition.

[0119] First, a calibration infrared detector and a uniform radiation surface capable of uniformly emitting thermal radiation signals are set inside the temperature control device, and the calibration infrared detector is aligned with the uniform radiation surface.

[0120] Then, the temperature control device adjusts its internal temperature according to a preset temperature change rate, so that the ambient temperature of the calibration infrared detector, the internal temperature of the calibration infrared detector, and the temperature of the radiation homogeneous surface also change according to this temperature change rate. During this process, the calibration infrared detector collects data from the radiation homogeneous surface at preset temperature intervals to obtain various background data. The temperature change rate of the temperature control device can be set to the fastest achievable rate, without requiring insulation, but it is necessary to ensure that the ambient temperature of the calibration infrared detector, the internal temperature of the calibration infrared detector, and the temperature of the radiation homogeneous surface remain as consistent as possible.

[0121] 2. Temperature range division.

[0122] For the temperature change range of the temperature control device, the temperature change range can be divided into multiple temperature intervals. Then, for each background data obtained, the temperature interval to which each background data belongs can be determined according to the acquisition temperature of the background data. That is, for a background data, the temperature interval to which the acquisition temperature of the background data is located is assigned to that temperature interval.

[0123] 3. Determine the background data corresponding to the temperature range.

[0124] After determining the background data corresponding to each temperature range, for each temperature range, one background data point (i.e., the background data collected by the calibrated infrared detector within that temperature range) can be selected as the background data for that temperature range. The method for selecting a background data point can be set according to actual usage requirements and is not specifically limited here.

[0125] For example, for each background data collected by the calibrated infrared detector in the temperature range [a, b), the background data with the lowest collection temperature can be determined as the background data corresponding to that temperature range, or the background data with the highest collection temperature can be determined as the background data corresponding to that temperature range, or a background data can be randomly selected from each background data to determine the background data corresponding to that temperature range. No specific limitation is made here.

[0126] 4. Determine the set of temperature drift coefficients corresponding to the temperature range.

[0127] For the grayscale image acquired by the calibration infrared detector, each pixel in the grayscale image exhibits different temperature drift amounts due to positional differences. Therefore, in order to achieve more accurate temperature drift correction, when calibrating the temperature drift coefficient, the temperature drift coefficient corresponding to each pixel can be determined independently, thereby constructing a set of temperature drift coefficients.

[0128] Furthermore, for the detection array composed of various thermistors inside the calibration infrared detector, it can be divided into two main categories: photosensitive area and non-photosensitive area. The photosensitive area is the region within the detection array that can receive thermal radiation signals from the scene to be detected, while the non-photosensitive area is the region within the detection array that is blocked by a specific structure and cannot receive thermal radiation signals from the scene to be detected. The non-photosensitive area can be located above, below, to the left, and / or to the right of the photosensitive area, which is determined by the specific internal structure of the infrared detector and is not specifically limited here.

[0129] Given the different sources of the thermal radiation signals received in these two regions, their temperature drift characteristics are also quite different. Therefore, different methods can be used for the photosensitive and non-photosensitive regions to determine the corresponding temperature drift coefficient sets for each region.

[0130] Based on this, for each temperature range, the following operations can be performed to determine the set of temperature drift coefficients corresponding to that temperature range:

[0131] First, among the background data corresponding to each temperature range, determine the lowest relative low temperature background data and the highest relative high temperature background data.

[0132] Secondly, for the photosensitive area, the first type of pixels corresponding to the photosensitive area can be identified in each pixel of the relatively low-temperature background data and the relatively high-temperature background data. Then, the average difference between the gray values ​​of the first type of pixels in the relatively low-temperature background data and the gray values ​​of the first type of pixels in the relatively high-temperature background data can be calculated as the overall gray-level difference. Furthermore, for every two first type of pixels at the same position in the relatively low-temperature background data and the relatively high-temperature background data, the target difference between the gray-level difference between the two first type of pixels and the overall gray-level difference is calculated. The ratio between this target difference and the temperature difference of the temperature range is then calculated as the temperature drift coefficient corresponding to the pixel at that position in the background data of that temperature range.

[0133] In one implementation, the temperature drift coefficient corresponding to a pixel in the photosensitive area can be determined using the following formula:

[0134] ;

[0135] in, The coordinates of the photosensitive area are: The temperature drift coefficient corresponding to each pixel. The coordinates in the relative high temperature background data are: The grayscale value of the pixel. The coordinates in the relative low temperature background data are: The grayscale value of the pixel. This indicates the area set within the photosensitive area. Representing the relative high temperature background data The coordinates within the region are The grayscale value of the pixel. Representing the relative low temperature background data The coordinates within the region are The grayscale value of the pixel. express The number of pixels in the area This indicates the temperature at which the relative high temperature background data was collected. This indicates the temperature at which the relatively low-temperature background data was collected.

[0136] Regarding the above In terms of area setting, since the size of the data collected by the same infrared detector is fixed, for a pixel in one data point collected by the infrared detector, a corresponding pixel can be found in other data collected by the same infrared detector. Therefore, a photosensitive area is pre-set in the photosensitive area of ​​the data collected by the infrared detector. After the region is defined, each piece of background data collected by the infrared detector can be analyzed according to the set parameters. The location and size of the region are used to determine the background data in each baseline dataset. area.

[0137] For example, with Figure 2 Taking the background data shown as an example, the non-photosensitive area is located below the photosensitive area. The area shown as the shaded part within the photosensitive area can be defined as... The region, among which, The width of the area is equal to the width of the photosensitive area. The height of the region is 1 pixel. The area is located adjacent to the boundary between the non-photosensitive and photosensitive areas. Of course, Figure 2 shown The area settings are for illustrative purposes only, and those skilled in the art can adjust them according to actual usage needs. The width, height, and location of the area are not specifically limited here. It should be noted that... Figure 2 The spacing between the non-photosensitive and photosensitive areas in the image is only for easy distinction; in actual infrared detectors, the non-photosensitive and photosensitive areas may be connected together.

[0138] For non-photosensitive areas, the second type of pixels corresponding to the non-photosensitive areas can be identified in each pixel of the relatively low temperature background data and the relatively high temperature background data. Then, for every two second type of pixels with the same position in the relatively low temperature background data and the relatively high temperature background data, the ratio between the grayscale difference between the two second type of pixels and the temperature difference of the temperature range is calculated, which is used as the temperature drift coefficient of the pixel at that position in the background data corresponding to the temperature range.

[0139] In one implementation, the temperature drift coefficient corresponding to a pixel in a non-photosensitive area can be determined using the following formula:

[0140] ;

[0141] in, The coordinates of the non-photosensitive area are: The temperature drift coefficient corresponding to each pixel. The coordinates in the relative high temperature background data are: The grayscale value of the pixel. The coordinates in the relative low temperature background data are: The grayscale value of the pixel. This indicates the temperature at which the relative high temperature background data was collected. This indicates the temperature at which the relatively low-temperature background data was collected.

[0142] After obtaining the temperature drift coefficients corresponding to pixels in the photosensitive and non-photosensitive areas, a set of temperature drift coefficients corresponding to that temperature range can be generated based on these coefficients. This set can be a temperature drift coefficient matrix with the same size as the data acquired by the calibrated infrared detector, where each pixel value in the matrix is ​​a temperature drift coefficient. The set can also be a table recording each pixel and its corresponding temperature drift coefficient; the specific form of the temperature drift coefficient set is not limited here.

[0143] In one implementation, because the detection array in the infrared detector is a device that converts thermal radiation signals into electrical signals, the voltage parameters of the detection array directly affect its output. When the ambient temperature changes, the voltage of the detection array will drift. Therefore, during the calibration process, in order to keep the grayscale values ​​of the pixels in the background data collected by the calibrated infrared detector within a certain range, the voltage parameters of the detection array need to be adaptively adjusted according to temperature changes. The voltage parameters of the detection array include: the overall voltage parameters of the detection array and the voltage values ​​of each response unit within the detection array.

[0144] When adaptively adjusting the voltage parameters of the detection array according to temperature changes, the voltage parameters corresponding to different temperatures can be set by those skilled in the art based on the type of infrared detector and the grayscale values ​​of each pixel in the actual detection results of the infrared detector at different temperatures. No specific limitations are made here on the voltage parameters corresponding to each temperature.

[0145] For example, at different temperatures, it can be done according to Figure 3 The sensor parameter settings in the "Sensor Parameter Variation Trend with Temperature" section specify the voltage parameters of the detector array, thereby enabling the temperature-dependent variation trend of the reference background of the infrared detector (i.e., the overall grayscale level variation trend of pixels in the background data collected by the infrared detector at different temperatures) to be as shown. Figure 4 The value shown remains within a certain range of variation.

[0146] It should be noted that, in addition to determining each temperature range and its corresponding background data and temperature drift coefficient set to establish the correspondence between the calibration temperature, temperature drift coefficient set, and background data, it is also possible to determine each calibration temperature and its corresponding background data and temperature drift coefficient set without dividing the temperature range. Specifically:

[0147] After completing "1. Temperature Control and Data Acquisition", for each background data point, the acquisition temperature of that background data can be used as a calibration temperature, thus defining the background data corresponding to that calibration temperature. Furthermore, two background data points whose acquisition temperatures are adjacent to the acquisition temperature of the current background data point (where one background data point has an acquisition temperature higher than the current one, and the other has an acquisition temperature lower than the current one) can be defined as the relatively high-temperature background data and relatively low-temperature background data corresponding to that calibration temperature. Then, using the method described above for determining the temperature drift coefficient set during the calibration process, the set of temperature drift coefficients corresponding to that calibration temperature can be determined.

[0148] After obtaining the correspondence between the temperature, temperature drift coefficient set, and background data corresponding to each infrared detector through the above calibration method, i.e., obtaining the calibration data corresponding to each infrared detector, the calibration data can be stored in the electronic device executing the infrared detection result correction method provided in the embodiments of this application. Specifically, when the electronic device is the infrared detector itself, only the calibration data corresponding to that infrared detector can be stored in the electronic device to save storage space. When the electronic device is a computer, server, or other device connected to the infrared detector, the calibration data corresponding to each infrared detector can be stored in the electronic device so that the electronic device can perform temperature drift correction on each infrared detector.

[0149] For an infrared detector, after the calibration data (the correspondence between temperature, temperature drift coefficient set, and background data) corresponding to the infrared detector is determined through the above method, the electronic device can correct the detection results of the infrared detector based on the calibration data. The embodiments of this application will be described below. Figure 1 The infrared detection result correction method shown is as follows:

[0150] Because the photosensitive area is the region in the infrared detector's array that can receive thermal radiation signals from the scene to be detected, the final infrared detection result output by the infrared detector is a grayscale image generated based on the thermal radiation signals received by its photosensitive area.

[0151] Therefore, when the electronic device corrects the detection results of the target infrared detector, it can acquire a first grayscale image generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector. Simultaneously, the electronic device can also acquire the ambient temperature corresponding to the first grayscale image. The ambient temperature corresponding to the first grayscale image refers to the ambient temperature at which the photosensitive area received the first thermal radiation signal.

[0152] To obtain the ambient temperature corresponding to the first grayscale image, in one approach, the infrared detector's detection array can be pre-configured with array units for sensing ambient temperature. In this case, when the electronic device receives the first thermal radiation signal through the photosensitive area, the detection result of the array units determines the ambient temperature. In another approach, the infrared detector can have a temperature sensor internally. In this case, when the electronic device receives the first thermal radiation signal through the photosensitive area, the temperature detection result of the temperature sensor determines the ambient temperature. These two methods for determining ambient temperature are merely examples; those skilled in the art can select other methods based on actual usage requirements, and no specific limitations are imposed here.

[0153] After obtaining the ambient temperature corresponding to the first grayscale image, if the electronic device only stores the calibration data corresponding to the target infrared detector, it can directly determine the target temperature drift coefficient set and target background data corresponding to the ambient temperature from the calibration data (the pre-calibrated correspondence between the temperature, temperature drift coefficient set, and background data). If the electronic device stores calibration data corresponding to each infrared detector, it can determine the calibration data corresponding to the target infrared detector from the calibration data based on the detector's identification information, and then determine the target temperature drift coefficient set and target background data corresponding to the ambient temperature from the determined calibration data (the pre-calibrated correspondence between the temperature, temperature drift coefficient set, and background data).

[0154] In one implementation, given the pre-defined correspondence between temperature, temperature drift coefficient set, and background data, including each temperature range and its corresponding temperature drift coefficient set and background data, when determining the target temperature drift coefficient set and target background data corresponding to the ambient temperature, the electronic device can first determine the target temperature range including the ambient temperature in each temperature range, and then determine the temperature drift coefficient set and background data corresponding to the target temperature range as the target temperature drift coefficient set and target background data corresponding to the ambient temperature.

[0155] After obtaining the target background data and the target temperature drift coefficient set, since the calibration infrared detector that collects the target background data and the target infrared detector are actually the same infrared detector, the size of the data collected by the two is completely consistent. That is to say, for each first pixel in the first grayscale image, each pixel corresponding to each first pixel can be found in the target background data, and the target temperature drift coefficient set includes the temperature drift coefficient corresponding to each pixel in the target background data.

[0156] Therefore, for each first pixel in the first grayscale image, the electronic device can determine the pixel corresponding to the first pixel in the target background data, and then determine the grayscale value of the pixel as the reference grayscale value corresponding to the first pixel, and determine the temperature drift coefficient corresponding to the pixel recorded in the target temperature drift coefficient set as the temperature drift coefficient corresponding to the first pixel.

[0157] Furthermore, after obtaining the temperature drift coefficient corresponding to each first pixel, the electronic device can calculate the product between the temperature drift coefficient and the temperature difference corresponding to each first pixel, which is used as the temperature drift amount corresponding to each first pixel. The temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0158] That is, electronic devices can calculate the temperature drift corresponding to each first pixel using the following formula:

[0159] ;

[0160] in, The coordinates in the first grayscale image are: The amount of temperature drift corresponding to each pixel. The coordinates in the first grayscale image are... The temperature drift coefficient corresponding to each pixel. This represents the ambient temperature corresponding to the first grayscale image. This indicates the temperature at which the target baseline data was collected.

[0161] After obtaining the temperature drift and reference grayscale value corresponding to each first pixel, the electronic device can subtract the temperature drift and reference grayscale value from the grayscale value of each first pixel to correct the grayscale value of each first pixel, thereby obtaining a second grayscale image. Specifically, the electronic device can correct the grayscale value of each first pixel using the following formula:

[0162] ;

[0163] in, The coordinates in the second grayscale image are The grayscale value of the pixel. The coordinates in the first grayscale image are... The grayscale value of the pixel. The coordinates in the first grayscale image are... The reference gray value corresponding to the pixel. The coordinates in the first grayscale image are... The amount of temperature drift corresponding to each pixel.

[0164] In the solution provided in this application embodiment, by acquiring the first grayscale image generated by the infrared detector and its corresponding ambient temperature, and utilizing the correspondence between a pre-calibrated set of temperatures, temperature drift coefficients, and background data, the temperature drift coefficient and reference grayscale value of each pixel are determined. Thus, without relying on a baffle to obstruct the image, the grayscale value of each pixel is corrected using its temperature drift coefficient and reference grayscale value to eliminate the influence of temperature drift, ultimately obtaining a corrected second grayscale image. Furthermore, since the solution provided in this application embodiment avoids using a baffle to obstruct the infrared detector, the continuity of the detection process is ensured to remain unaffected. Moreover, compared to infrared detectors using baffles, the solution provided in this application embodiment also reduces the power consumption of the infrared detector and increases its lifespan.

[0165] While performing temperature drift correction on the output of the photosensitive area (i.e., the first grayscale image) using the above methods, the electronic device can further remove image noise from the output of the photosensitive area by using the output of the non-photosensitive area. The noise removal method provided in the embodiments of this application will be described below:

[0166] As one implementation method of this application, such as Figure 5 As shown, before performing step S104, the electronic device may also perform steps S501-S504.

[0167] S501, obtain the third grayscale image.

[0168] When the photosensitive area receives thermal radiation signals from the scene to be detected, it may also be affected by interference from factors within the infrared detector itself. This interference may originate from manufacturing defects in the detector, changes in the operating environment (such as temperature changes, electromagnetic interference, etc.), or errors in the signal processing. The non-photosensitive area, however, is blocked by a specific structure and does not receive thermal radiation signals from the scene to be detected. Therefore, the output of the non-photosensitive area can reflect the noise level within the infrared detector.

[0169] Therefore, in addition to acquiring a first grayscale image generated from the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, the electronic device can also acquire a third grayscale image generated from the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector. Based on this third grayscale image, the noise parameters in the first grayscale image can be determined, and the first grayscale image can be denoised. The acquisition times of the first and third grayscale images must be consistent; that is, the time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal.

[0170] S502, based on the target temperature drift coefficient set and the target background data, correct the gray values ​​of each second pixel in the third grayscale image to obtain the fourth grayscale image.

[0171] The output of non-photosensitive areas is also affected by temperature drift and will produce errors. Therefore, after obtaining the third grayscale image, the electronic device can first correct the grayscale value of each second pixel in the third grayscale image according to the target temperature drift coefficient set and the target background data to obtain the fourth grayscale image. Then, based on the fourth grayscale image (i.e. the corrected output of the non-photosensitive area), the graphic noise in the output of the photosensitive area can be determined.

[0172] The specific method for "correcting the grayscale values ​​of each second pixel in the third grayscale image" will be discussed later. Figure 6 The embodiments shown are described in detail, and will not be repeated here.

[0173] S503, in the pre-established correspondence between infrared detector types and pattern noise types, determine the target pattern noise type corresponding to the target infrared detector type.

[0174] Because the characteristics of the detection arrays inside different types of infrared detectors may vary, the type of image noise in the first grayscale image acquired by different types of infrared detectors may also differ. For example, a Class A infrared detector may exhibit vertical stripe image noise in its acquired first grayscale image, while a Class B infrared detector may exhibit horizontal stripe image noise, and so on.

[0175] Therefore, before determining the noise parameters in the first grayscale image based on the fourth grayscale image, the electronic device can first determine the target graphic noise type corresponding to the type of the target infrared detector in the pre-established correspondence between the infrared detector type and the graphic noise type.

[0176] S504, Based on the fourth grayscale image, determine the set of noise parameters corresponding to the noise type of the target image.

[0177] After the electronic device determines the target image noise type corresponding to the type of the target infrared detector, it can determine the noise parameter set corresponding to the target image noise type based on the fourth grayscale image, that is, determine the noise parameters corresponding to each pixel in the first grayscale image.

[0178] For example, when the target graphic noise type is vertical stripe graphic noise, the electronic device can determine the set of vertical stripe graphic noise parameters according to the following formula:

[0179] ;

[0180] in, This indicates that the first grayscale image is located at the th The vertical stripe noise parameters of the column pixels. and The height of the fourth grayscale image is set to be greater than or equal to 1 and less than or equal to the pre-defined height. Two constants, and , The coordinates in the fourth grayscale image are: The grayscale value of the pixel. This indicates the width of the fourth grayscale image. The coordinates in the fourth grayscale image are: The grayscale value of the pixel.

[0181] For constants and Those skilled in the art can adjust it according to actual usage needs, for example, by Set to 1, Set as etc., without making specific limitations here.

[0182] For example, when the target graphic noise type is striped graphic noise, the electronic device can determine the set of striped graphic noise parameters according to the following formula:

[0183] ;

[0184] in, This indicates that the first grayscale image is located at the th The horizontal bar noise parameters of the pixels in the row. and The width of the fourth grayscale image is set to be greater than or equal to 1 and less than or equal to the preset value. Two constants, and , The coordinates in the fourth grayscale image are: The grayscale value of the pixel. Indicates the height of the fourth grayscale image. The coordinates in the fourth grayscale image are: The grayscale value of the pixel.

[0185] For constants and Those skilled in the art can adjust it according to actual usage needs, for example, by Set to 1, Set as etc., without making specific limitations here.

[0186] Of course, if the target infrared detector type corresponds to multiple pattern noise types, the electronic device can determine the noise parameter set corresponding to each of these multiple pattern noise types separately. For example, for an infrared detector, if there are non-photosensitive areas above / below its photosensitive area and to its left / right sides, and the pattern noise type corresponding to this infrared detector type includes vertical stripe pattern noise and horizontal stripe pattern noise, then the electronic device can determine the noise parameter set corresponding to each of these types based on the fourth grayscale image collected from the non-photosensitive areas on the left / right sides. On the other hand, it can be determined based on the fourth grayscale image collected from the non-photosensitive areas above / below. .

[0187] It should be noted here that... Figure 5 The execution order between steps S501-S502 and step S503 shown is just an example. The electronic device can also execute step S503 first and then execute steps S501-S502, or execute steps S501-S502 and step S503 at the same time. As long as step S504 is executed after steps S503 and S502, no specific limitation is made here.

[0188] Correspondingly, such as Figure 5 As shown, when the electronic device performs step S104 above, it can specifically achieve this through step S505:

[0189] S505, based on the noise parameters, temperature drift and reference gray value corresponding to each first pixel, corrects the gray value of each first pixel to obtain the second grayscale image.

[0190] After obtaining the noise parameter set, the electronic device can determine the noise parameters corresponding to each first pixel in the first grayscale image. Based on this, the electronic device can correct the grayscale values ​​of each first pixel according to the noise parameters, temperature drift, and reference grayscale values, thus obtaining the second grayscale image. Specifically, the electronic device can correct the grayscale values ​​of each first pixel using the following formula:

[0191] ;

[0192] in, The coordinates in the second grayscale image are The grayscale value of the pixel. The coordinates in the first grayscale image are... The grayscale value of the pixel. The coordinates in the first grayscale image are... The reference gray value corresponding to the pixel. The coordinates in the first grayscale image are... The amount of temperature drift corresponding to each pixel. The coordinates in the first grayscale image are... The noise parameters corresponding to the pixels can be... and / or wait.

[0193] In the solution provided in this application, the electronic device can determine the noise parameters in the first grayscale image (i.e., the output of the photosensitive area) through the output of the non-photosensitive area. Then, based on the determined noise parameters, the first grayscale image is denoised, which can significantly improve the image clarity and signal-to-noise ratio, resulting in a more realistic and detailed image. Furthermore, through a pre-established correspondence between infrared detector types and graphic noise types, the unique graphic noise type (such as vertical stripes, horizontal stripes, etc.) can be determined for different types of infrared detectors. This helps to extract noise parameters more accurately, thereby improving the targeting and effectiveness of the denoising process. In addition, the electronic device can first perform temperature drift correction on the output of the non-photosensitive area, and then determine the noise parameter set based on the corrected output of the non-photosensitive area. This can more effectively reflect the actual noise situation, providing a more reliable basis for subsequent image processing and noise suppression.

[0194] As one implementation method of this application, such as Figure 6 As shown, when the electronic device performs step S502, it can specifically achieve this through steps S601-S602:

[0195] S601, for each second pixel in the third grayscale image, determine the temperature drift coefficient corresponding to the second pixel in the target temperature drift coefficient set, calculate the temperature drift amount corresponding to the second pixel based on the temperature drift coefficient, and determine the reference grayscale value corresponding to the second pixel in the target background data.

[0196] As can be seen from the aforementioned calibration process, the target background data includes not only the pixels that correspond one-to-one with each first pixel in the first grayscale image, but also the pixels that correspond one-to-one with each second pixel in the third grayscale image. Furthermore, the target temperature drift coefficient set includes the temperature drift coefficients corresponding to each pixel in the target background data.

[0197] Therefore, for each second pixel in the third grayscale image, the electronic device can determine the grayscale value of the second pixel as the reference grayscale value of the second pixel by matching the corresponding pixel in the target background data, and determine the temperature drift coefficient of the second pixel as the temperature drift coefficient of the second pixel by recording the temperature drift coefficient in the target temperature drift coefficient set.

[0198] Furthermore, after obtaining the temperature drift coefficient corresponding to each second pixel, the electronic device can calculate the product between the temperature drift coefficient and the temperature difference corresponding to each second pixel, which is used as the temperature drift amount corresponding to each second pixel. The temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0199] Electronic devices can calculate the temperature drift corresponding to each second pixel using the following formula:

[0200] ;

[0201] in, The coordinates in the third grayscale image are The amount of temperature drift corresponding to each pixel. The coordinates in the third grayscale image are The temperature drift coefficient corresponding to each pixel. This represents the ambient temperature corresponding to the first grayscale image. This indicates the temperature at which the target baseline data was collected.

[0202] S602, based on the temperature drift amount and reference gray value corresponding to each second pixel, correct the gray value of each second pixel to obtain the fourth grayscale image.

[0203] After obtaining the temperature drift and reference grayscale value corresponding to each second pixel, the electronic device can subtract the temperature drift and reference grayscale value from the grayscale value of each second pixel to correct the grayscale value of each second pixel, thereby obtaining a fourth grayscale image. Specifically, the electronic device can correct the grayscale value of each second pixel using the following formula:

[0204] ;

[0205] in, The coordinates in the fourth grayscale image are: The grayscale value of the pixel. The coordinates in the third grayscale image are The grayscale value of the pixel. The coordinates in the third grayscale image are The reference gray value corresponding to the pixel. The coordinates in the third grayscale image are The amount of temperature drift corresponding to each pixel.

[0206] In the solution provided in this application embodiment, since the output of the non-photosensitive area is also affected by temperature drift and thus produces errors, the electronic device introduces temperature drift correction of the third grayscale image before determining the noise parameter set, and then determines the noise parameter set based on the fourth grayscale image obtained after correction. This can more effectively reflect the actual noise situation and provide a more reliable basis for subsequent image processing and noise suppression.

[0207] Before determining the reference grayscale value based on the target background data, the electronic device can also correct the target background data, and then determine the reference grayscale value based on the corrected target background data. The background data correction method provided in the embodiments of this application will be described below:

[0208] As one implementation method of this application, such as Figure 7 As shown, before determining the reference grayscale value based on the target background data, the electronic device may also perform steps S701-S703.

[0209] S701, for each second pixel in the third grayscale image, determine the corresponding third pixel in the target background data, and calculate the difference between the grayscale values ​​of the second pixel and the third pixel.

[0210] S702, calculate the average of the obtained differences, and use it as the background data correction amount.

[0211] For the non-photosensitive area, located inside the infrared detector, the collected thermal radiation signal also originates from within the detector. Therefore, the background data obtained through the non-photosensitive area is relatively accurate. In contrast, for the non-photosensitive area, located inside the infrared detector, the collected thermal radiation signal originates from outside the detector. Furthermore, during the background data acquisition process, the temperature inside the temperature control device is not maintained but continuously changing. This means the background data acquisition is not in a steady-state state; therefore, the background data obtained through the non-photosensitive area will contain some errors.

[0212] Therefore, before using the target background data to determine the reference grayscale value corresponding to the first pixel in the first grayscale image, the electronic device can first correct the portion of the background data corresponding to the photosensitive area in the target background data through the output of the non-photosensitive area. Specifically:

[0213] For each second pixel in the third grayscale image, the electronic device can determine a third pixel in the target background data that is symmetrical to the second pixel about the boundary between the photosensitive area and the non-photosensitive area. Then, it calculates the difference between the grayscale values ​​of the second pixel and the third pixel, and further calculates the average of the obtained differences as the background data correction amount.

[0214] Among them, the pixels in the third grayscale image and the pixels in the target background data are symmetrical about the boundary line between the photosensitive and non-photosensitive areas. Here, we take... Figure 8 Taking the target baseline data and the real-time acquired grayscale images (first grayscale image and third grayscale image) as examples, we will introduce the positional relationship between the two.

[0215] like Figure 8 As shown, for pixel a1 in the third grayscale image, it is located in the first column of the third grayscale image, in the second row below the boundary line between the photosensitive area and the non-photosensitive area (i.e., the boundary line between the first grayscale image and the third grayscale image). Pixel a2 in the target background data is located in the first column of the target background data, in the second row above the boundary line between the photosensitive area and the non-photosensitive area. Therefore, pixel a1 in the third grayscale image and pixel a2 in the target background data are symmetrical about the boundary line between the photosensitive area and the non-photosensitive area.

[0216] It should be noted that when calculating the baseline data correction amount, the electronic device may calculate the average grayscale difference between all second pixels and their corresponding third pixels in the third grayscale image, or it may calculate the average grayscale difference between some second pixels and their corresponding third pixels in the third grayscale image. In other words, "for each second pixel in the third grayscale image" in step S701 may be "for all second pixels in the third grayscale image" or "for some second pixels in the third grayscale image".

[0217] S703, for each pixel in the target background data corresponding to the photosensitive area, updates the reference gray value of the pixel to the difference between the gray value of the pixel and the background data correction amount.

[0218] After obtaining the background data correction amount, the electronic device can calculate the difference between the gray value of each pixel and the background data correction amount for each pixel in the part of the background data corresponding to the photosensitive area in the target background data, and then update the reference gray value of the pixel to the calculated difference, thereby realizing the correction of the target background data.

[0219] In one embodiment, the electronic device can perform the above steps S701-S703 using the following formula:

[0220] ;

[0221] in, This indicates that the coordinates of the photosensitive area in the corrected target background data are... The grayscale value of the pixel. This indicates that the coordinates of the photosensitive area in the target background data are... The grayscale value of the pixel. This indicates the area set in the third grayscale image. Indicates the third grayscale image The coordinates within the region are The grayscale value of the pixel. This indicates the target background data and the third grayscale image. The coordinates within the region are The grayscale value of a pixel that is symmetrical about the boundary between the photosensitive area and the non-photosensitive area. express The number of pixels within the region.

[0222] Accordingly, when the electronic device determines the reference gray value corresponding to the first pixel in the first grayscale image in the target background data, it can specifically determine the reference gray value corresponding to the first pixel in each of the updated reference gray values ​​included in the target background data, that is, determine the reference gray value corresponding to the first pixel in the corrected target background data.

[0223] In the solution provided by this application embodiment, the non-steady state caused by the continuous temperature change inside the temperature control device leads to errors in some of the background data corresponding to the photosensitive area. Therefore, the electronic device introduces a correction to the background data before using it, and then determines the reference grayscale value corresponding to the pixel in the first grayscale image based on the corrected background data, providing a more reliable basis for subsequent grayscale value correction. Furthermore, the solution provided by this application embodiment can select to calculate the average grayscale difference of all or some pixels as the correction amount according to actual needs, further improving correction efficiency and adaptability.

[0224] After the electronic device corrects the output of the photosensitive area to obtain a second grayscale image, it can further correct the second grayscale image based on a preset gain correction coefficient. The following will describe the correction method based on the preset gain correction coefficient provided in the embodiments of this application:

[0225] As one implementation method of this application, such as Figure 9 As shown, after the electronic device completes step S104, it can also execute step S901.

[0226] S901, for each fourth pixel in the second grayscale image, determine the gain correction coefficient corresponding to the fourth pixel in the pre-calibrated gain correction coefficient set, and calculate the product between the gain correction coefficient corresponding to the fourth pixel and the grayscale value of the fourth pixel as the corrected grayscale value of the fourth pixel, thus obtaining the fifth grayscale image.

[0227] For the detection array inside an infrared detector, the individual response units in the array may exhibit different response characteristics due to factors such as manufacturing process, material differences, or working environment. These differences in response characteristics may lead to errors in the data output by the infrared detector.

[0228] To address this issue, the electronic device can also store a pre-calibrated set of gain correction coefficients corresponding to the target infrared detector. This set of gain correction coefficients includes the gain correction coefficients corresponding to each pixel in the grayscale image acquired by the target infrared detector. The specific calibration method for the gain correction coefficient set will be discussed later. Figure 10 The embodiments shown are described in detail, and will not be repeated here.

[0229] Based on this, after the electronic device obtains the second grayscale image after performing the above step S104, it can further determine the gain correction coefficient corresponding to each fourth pixel in the second grayscale image from a pre-calibrated set of gain correction coefficients, and calculate the product between the gain correction coefficient corresponding to the fourth pixel and the grayscale value of the fourth pixel as the corrected grayscale value of the fourth pixel, thus obtaining the fifth grayscale image. Specifically, the electronic device can calculate the fifth grayscale image using the following formula:

[0230]

[0231] in, The coordinates in the fifth grayscale image are: The grayscale value of the pixel. The coordinates in the second grayscale image are The gain correction coefficient corresponding to each pixel. The coordinates in the second grayscale image are The grayscale value of the pixel.

[0232] In the solution provided in this application embodiment, the electronic device introduces a pre-calibrated set of gain correction coefficients to address the differences in response characteristics of each response unit in the internal detection array of the infrared detector caused by factors such as manufacturing process, material differences, or working environment. This enables further correction of the grayscale value of each pixel in the second grayscale image, thereby further improving the accuracy of the output data of the infrared detector.

[0233] As one implementation method of this application, such as Figure 10 As shown, the gain correction coefficient set can be calibrated according to steps S1001-S1003:

[0234] S1001, Obtain the first calibration grayscale image and the second calibration grayscale image.

[0235] When calibrating the correspondence between the temperature and temperature drift coefficient set corresponding to the infrared detector and the background data, two background data points whose acquisition temperature falls within the operating temperature range of the calibrated infrared detector can be identified from the acquired background data. Then, the portion of background data corresponding to the photosensitive area in these two background data points is used as the first calibration grayscale image and the second calibration grayscale image, respectively. That is, the first calibration grayscale image is generated based on the first calibration thermal radiation signal received by the photosensitive area of ​​the calibrated infrared detector at a first temperature. The first calibration thermal radiation signal is emitted by a radiative homogeneous surface at the first temperature. The second calibration grayscale image is generated based on the second calibration thermal radiation signal received by the photosensitive area of ​​the calibrated infrared detector at a second temperature. The second calibration thermal radiation signal is emitted by a radiative homogeneous surface at the second temperature. The first and second temperatures are two temperatures within the operating temperature range of the calibrated infrared detector.

[0236] S1002, calculate the average gray level of each pixel in the first calibrated grayscale image to obtain the first average gray level, and calculate the average gray level of each pixel in the second calibrated grayscale image to obtain the second average gray level.

[0237] S1003, for every two pixels at the same position in the first calibration grayscale image and the second calibration grayscale image, calculate the ratio between the first grayscale difference and the second grayscale difference corresponding to the two pixels, and use it as the gain correction coefficient at that position.

[0238] After obtaining the first and second calibration grayscale images, the average grayscale value of each pixel in the first calibration grayscale image can be calculated to obtain the first average grayscale value, and the average grayscale value of each pixel in the second calibration grayscale image can be calculated to obtain the second average grayscale value. Then, the difference between the first and second average grayscale values ​​can be calculated as the first grayscale difference value.

[0239] For every two pixels at the same position in the first and second calibration grayscale images, the ratio between the first grayscale difference and the difference between the grayscale values ​​of the two pixels (the second grayscale difference) can be calculated as the gain correction coefficient at that position, thereby obtaining the gain correction coefficient corresponding to each pixel in the grayscale image acquired by the calibration infrared detector.

[0240] In one embodiment, the electronic device can perform the above steps S1002-S1003 by the following formula:

[0241] ;

[0242] in, This indicates that the coordinates of the image region corresponding to the photosensitive area in the grayscale image acquired by the calibrated infrared detector are... The gain correction coefficient corresponding to each pixel. This represents the average grayscale value of each pixel in the first calibrated grayscale image. This represents the average grayscale value of each pixel in the second calibration grayscale image. The coordinates in the first calibrated grayscale image are: The grayscale value of the pixel. The coordinates in the second calibration grayscale image are: The grayscale value of the pixel.

[0243] In the solution provided in this application embodiment, by acquiring two calibration grayscale images (first calibration grayscale image and second calibration grayscale image) at different temperatures, and calculating the average grayscale value and the difference ratio of each pixel in the two grayscale images, the difference in response characteristics of each response unit of the internal detection array of the infrared detector caused by factors such as manufacturing process, material difference or working environment can be accurately calibrated.

[0244] As one embodiment of this application, the infrared detection result correction method performed by the electronic device can specifically be:

[0245] After acquiring the first grayscale image, the third grayscale image, and the ambient temperature corresponding to the first grayscale image, and determining the target temperature drift coefficient set and target background data corresponding to the ambient temperature, the electronic device can correct the target background data.

[0246] Then, on the one hand, the electronic device can perform temperature drift correction on the third grayscale image based on the target temperature drift coefficient set and the corrected target background data to obtain the fourth grayscale image, and on the other hand, determine the noise parameters corresponding to each pixel in the first grayscale image based on the fourth grayscale image.

[0247] On the other hand, the electronic device can determine the temperature drift amount and reference gray value corresponding to each pixel in the first grayscale image based on the target temperature drift coefficient set and the corrected target background data, and determine the gain correction coefficient corresponding to each pixel in the first grayscale image based on the pre-calibrated gain correction coefficient set.

[0248] Finally, the electronic device can correct the first grayscale image according to the noise parameters, temperature drift, reference grayscale value and gain correction coefficient corresponding to each pixel in the first grayscale image, and obtain the corrected grayscale image, which is the final output result of the infrared detector.

[0249] ;

[0250] in, The coordinates in the corrected grayscale image are: The grayscale value of the pixel. The coordinates in the first grayscale image are... The gain correction coefficient corresponding to each pixel. The coordinates in the first grayscale image are... The grayscale value of the pixel. The coordinates in the first grayscale image are... The reference grayscale value corresponding to the pixel. The coordinates in the first grayscale image are... The amount of temperature drift corresponding to each pixel. The coordinates in the first grayscale image are... The noise parameters corresponding to the pixels. This represents the bias compensation constant, which can be set according to the actual application scenario.

[0251] by Figure 11 For example, the first grayscale image is Figure 11 In the left image, the corrected grayscale image is obtained after the electronic device corrects the first grayscale image using the above formula. Figure 11 The right image in the text.

[0252] In the solution provided in this application, a certain amount of image noise can be eliminated by establishing a pre-calibrated correspondence between the temperature, temperature drift coefficient set, and background data. Real-time correction of the output of the photosensitive area using the output of the non-photosensitive area can correct fixed image noise introduced by drift characteristic changes. Simultaneously, real-time correction of the background data using the real-time output of the non-photosensitive area enables dynamic correction of the background data offset, ensuring a certain stability in the absolute output and dynamic range of the infrared detector. Through these various correction methods, the accuracy of the corrected output of the photosensitive area can reach the temperature measurement level, meaning the final output of the infrared detector can be used for temperature measurement.

[0253] Corresponding to the above-described infrared detection result correction method, this application embodiment also provides an infrared detection result correction device, which is described below.

[0254] like Figure 12 As shown, an infrared detection result correction device includes:

[0255] The first acquisition module 1201 is used to acquire a first grayscale image and the ambient temperature corresponding to the first grayscale image. The first grayscale image is a grayscale image generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal.

[0256] The calibration data query module 1202 is used to determine the target temperature drift coefficient set and target background data corresponding to the ambient temperature in the correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data. The target temperature drift coefficient set includes the temperature drift coefficient corresponding to each pixel in the target background data.

[0257] The correction parameter determination module 1203 is used to determine the temperature drift coefficient corresponding to the first pixel in the target temperature drift coefficient set for each first pixel in the first grayscale image, calculate the temperature drift amount corresponding to the first pixel based on the temperature drift coefficient, and determine the reference grayscale value corresponding to the first pixel in the target background data.

[0258] The first correction module 1204 is used to correct the gray value of each first pixel according to the temperature drift and reference gray value corresponding to each first pixel, so as to obtain the second grayscale image.

[0259] In the solution provided in this application embodiment, the electronic device can acquire a first grayscale image and the corresponding ambient temperature. The first grayscale image is generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal. In a pre-defined correspondence between temperature, temperature drift coefficient set, and background data, a target temperature drift coefficient set and target background data corresponding to the ambient temperature are determined. The target temperature drift coefficient set includes the temperature drift coefficient corresponding to each pixel in the target background data. For each first pixel in the first grayscale image, the temperature drift coefficient corresponding to the first pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the first pixel is calculated based on the temperature drift coefficient. A reference grayscale value corresponding to the first pixel is also determined in the target background data. Based on the temperature drift amount and reference grayscale value corresponding to each first pixel, the grayscale value of each first pixel is corrected to obtain a second grayscale image. The solution provided in this application obtains a first grayscale image generated by an infrared detector and its corresponding ambient temperature. Utilizing the pre-calibrated correspondence between temperature, temperature drift coefficient set, and background data, it determines the temperature drift coefficient and reference grayscale value for each pixel. Thus, without relying on a baffle, it corrects the grayscale value of each pixel using its temperature drift coefficient and reference grayscale value to eliminate the influence of temperature drift, ultimately obtaining a corrected second grayscale image. Furthermore, since the solution provided in this application avoids using a baffle to obstruct the infrared detector, it ensures that the continuity of the detection process is not affected. Compared to infrared detectors using baffles, the solution provided in this application also reduces the power consumption of the infrared detector and increases its lifespan.

[0260] As one embodiment of this application, the correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data may include: each temperature range and its corresponding temperature drift coefficient set and background data;

[0261] The calibration data query module 1202 can be specifically used to determine the target temperature range, including the ambient temperature, in each temperature range, and to determine the set of temperature drift coefficients and background data corresponding to the target temperature range as the set of target temperature drift coefficients and target background data corresponding to the ambient temperature.

[0262] As one embodiment of this application, the correction parameter determination module 1203 can be specifically used to calculate the product between the temperature drift coefficient and the temperature difference corresponding to the first pixel point, as the temperature drift amount corresponding to the first pixel point, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0263] As one embodiment of this application, the above-described apparatus may further include:

[0264] The second acquisition module is used to acquire a third grayscale image, wherein the third grayscale image is a grayscale image generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector, and the time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal.

[0265] The second correction module is used to correct the gray values ​​of each second pixel in the third grayscale image based on the target temperature drift coefficient set and the target background data, so as to obtain the fourth grayscale image.

[0266] The noise type determination module is used to determine the target graphic noise type corresponding to the target infrared detector type based on the pre-established correspondence between infrared detector types and graphic noise types.

[0267] The noise parameter set determination module is used to determine the noise parameter set corresponding to the noise type of the target image based on the fourth grayscale image. The noise parameter set includes the noise parameters corresponding to each pixel in the first grayscale image.

[0268] The first correction module 1204 can be specifically used to correct the gray value of each first pixel based on the noise parameters, temperature drift and reference gray value corresponding to each first pixel.

[0269] As one embodiment of this application, the second correction module may include: a correction parameter determination unit, configured to determine the temperature drift coefficient corresponding to each second pixel in the third grayscale image from the target temperature drift coefficient set, calculate the temperature drift amount corresponding to the second pixel based on the temperature drift coefficient, and determine the reference grayscale value corresponding to the second pixel in the target background data; and a correction unit, configured to correct the grayscale value of each second pixel according to the temperature drift amount and the reference grayscale value corresponding to each second pixel, to obtain a fourth grayscale image.

[0270] As one embodiment of this application, the correction parameter determination unit can be specifically used to calculate the product between the temperature drift coefficient and the temperature difference corresponding to the second pixel point, as the temperature drift amount corresponding to the second pixel point, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

[0271] As one embodiment of this application, the above-described apparatus may further include:

[0272] The grayscale difference calculation module is used to determine the corresponding third pixel in the target background data for each second pixel in the third grayscale image, and to calculate the difference in grayscale value between the second pixel and the third pixel. The second pixel and the third pixel are symmetrical about the boundary line between the photosensitive area and the non-photosensitive area. The third grayscale image is generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector. The time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal.

[0273] The background data correction determination module is used to calculate the average of the obtained differences as the background data correction amount;

[0274] The background data correction module is used to update the reference gray value of each pixel in the target background data to the difference between the gray value of the pixel and the background data correction amount.

[0275] The correction parameter determination module 1203 can be specifically used to determine the reference gray value corresponding to the first pixel point among the updated reference gray values ​​included in the target background data output by the background data correction module.

[0276] As one embodiment of this application, the above-described apparatus may further include:

[0277] The second correction module is used to determine the gain correction coefficient corresponding to each fourth pixel in the second grayscale image output by the first correction module 1204 from a pre-calibrated set of gain correction coefficients, and calculate the product between the gain correction coefficient corresponding to the fourth pixel and the grayscale value of the fourth pixel as the corrected grayscale value of the fourth pixel to obtain the fifth grayscale image. The set of gain correction coefficients includes the gain correction coefficients corresponding to each pixel in the grayscale image acquired by the target infrared detector.

[0278] As one implementation method of this application, the gain correction coefficient set can be calibrated in the following manner:

[0279] A first calibration grayscale image and a second calibration grayscale image are obtained. The first calibration grayscale image is generated based on the first calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a first temperature. The first calibration thermal radiation signal is emitted by a radiating homogeneous surface at the first temperature. The second calibration grayscale image is generated based on the second calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a second temperature. The second calibration thermal radiation signal is emitted by a radiating homogeneous surface at the second temperature. The first temperature and the second temperature are two temperatures within the operating temperature range of the calibration infrared detector.

[0280] Calculate the average gray level of each pixel in the first calibrated grayscale image to obtain the first average gray level, and calculate the average gray level of each pixel in the second calibrated grayscale image to obtain the second average gray level;

[0281] For every two pixels at the same position in the first and second calibration grayscale images, the ratio between the first grayscale difference and the second grayscale difference corresponding to the two pixels is calculated as the gain correction coefficient at that position. The first grayscale difference is the difference between the first grayscale average value and the second grayscale average value, and the second grayscale difference is the difference between the grayscale values ​​of the two pixels.

[0282] As one implementation method of this application, the correspondence between temperature, temperature drift coefficient set and background data can be determined in the following manner:

[0283] The temperature control device adjusts the internal temperature of the temperature control device according to the preset temperature change rate, and controls the calibrated infrared detector set inside the temperature control device to collect data from the radiation uniform surface set inside the temperature control device according to the preset temperature interval, so as to obtain various background data.

[0284] For each pre-defined temperature range, perform the following operations to determine the set of temperature drift coefficients and background data corresponding to that temperature range:

[0285] One of the background data collected by the calibrated infrared detector within this temperature range is determined as the background data corresponding to this temperature range;

[0286] Among the background data collected by the calibrated infrared detector within this temperature range, determine the corresponding lowest relative low temperature background data and the corresponding highest relative high temperature background data.

[0287] For every two identical first-class pixels in the relatively low-temperature background data and the relatively high-temperature background data, a target difference between the grayscale difference between the two first-class pixels and the overall grayscale difference is calculated. The ratio of this target difference to the temperature difference of the temperature range is then calculated as the temperature drift coefficient for the pixel at that location in the background data corresponding to that temperature range. Here, the overall grayscale difference is the average difference between the grayscale values ​​of the first-class pixels in the relatively low-temperature background data and the grayscale values ​​of the first-class pixels in the relatively high-temperature background data. The first-class pixels are the pixels in the background data that correspond to the photosensitive area.

[0288] For every two identical second-class pixels in the relatively low-temperature background data and the relatively high-temperature background data, the ratio between the grayscale difference between the two second-class pixels and the temperature difference of the temperature range is calculated. This ratio is used as the temperature drift coefficient of the pixel at that position in the background data corresponding to the temperature range. Here, the second-class pixels are the pixels in the background data that correspond to the non-photosensitive area.

[0289] Based on the temperature drift coefficient of each pixel in the background data corresponding to the temperature range, a set of temperature drift coefficients corresponding to the temperature range is generated.

[0290] This application also provides an electronic device, such as... Figure 13 As shown, it includes:

[0291] Memory 1301 is used to store computer programs;

[0292] The processor 1302 is used to execute the program stored in the memory 1301 to implement the infrared detection result correction method described in any of the above embodiments.

[0293] In the solution provided in this application embodiment, the electronic device can acquire a first grayscale image and the corresponding ambient temperature. The first grayscale image is generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal. In a pre-defined correspondence between temperature, temperature drift coefficient set, and background data, a target temperature drift coefficient set and target background data corresponding to the ambient temperature are determined. The target temperature drift coefficient set includes the temperature drift coefficient corresponding to each pixel in the target background data. For each first pixel in the first grayscale image, the temperature drift coefficient corresponding to the first pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the first pixel is calculated based on the temperature drift coefficient. A reference grayscale value corresponding to the first pixel is also determined in the target background data. Based on the temperature drift amount and reference grayscale value corresponding to each first pixel, the grayscale value of each first pixel is corrected to obtain a second grayscale image. The solution provided in this application obtains a first grayscale image generated by an infrared detector and its corresponding ambient temperature. Utilizing the pre-calibrated correspondence between temperature, temperature drift coefficient set, and background data, it determines the temperature drift coefficient and reference grayscale value for each pixel. Thus, without relying on a baffle, it corrects the grayscale value of each pixel using its temperature drift coefficient and reference grayscale value to eliminate the influence of temperature drift, ultimately obtaining a corrected second grayscale image. Furthermore, since the solution provided in this application avoids using a baffle to obstruct the infrared detector, it ensures that the continuity of the detection process is not affected. Compared to infrared detectors using baffles, the solution provided in this application also reduces the power consumption of the infrared detector and increases its lifespan.

[0294] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 1302, the communication interface, and the memory 1301 communicating with each other via the communication bus.

[0295] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0296] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0297] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0298] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0299] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the infrared detection result correction method described in any of the above embodiments.

[0300] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the infrared detection result correction method described in any of the above embodiments.

[0301] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0302] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0303] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0304] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for correcting infrared detection results, characterized in that, The method includes: A first grayscale image and the corresponding ambient temperature are obtained, wherein the first grayscale image is a grayscale image generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal. In the pre-defined correspondence between temperature, temperature drift coefficient set and background data, the target temperature drift coefficient set and target background data corresponding to the ambient temperature are determined, wherein the target temperature drift coefficient set includes: the temperature drift coefficient corresponding to each pixel in the target background data; For each first pixel in the first grayscale image, the temperature drift coefficient corresponding to the first pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the first pixel is calculated based on the temperature drift coefficient, and the reference grayscale value corresponding to the first pixel is determined in the target background data. Based on the temperature drift and reference gray value of each first pixel, the gray value of each first pixel is corrected to obtain the second grayscale image.

2. The method according to claim 1, characterized in that, The correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data includes: each temperature range and its corresponding temperature drift coefficient set and background data; The step of determining the target temperature drift coefficient set and target background data corresponding to the ambient temperature from the pre-calibrated correspondence between the temperature, temperature drift coefficient set and background data includes: Within each temperature range, a target temperature range including the ambient temperature is determined, and the set of temperature drift coefficients and background data corresponding to the target temperature range are determined as the target temperature drift coefficient set and target background data corresponding to the ambient temperature.

3. The method according to claim 1, characterized in that, The calculation of the temperature drift amount corresponding to the first pixel based on the temperature drift coefficient includes: The product of the temperature drift coefficient and the temperature difference corresponding to the first pixel is calculated as the temperature drift amount corresponding to the first pixel, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

4. The method according to claim 1, characterized in that, Before correcting the grayscale value of each first pixel based on the temperature drift and reference grayscale value corresponding to each first pixel, the method further includes: A third grayscale image is obtained, wherein the third grayscale image is a grayscale image generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector, and the time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal. Based on the target temperature drift coefficient set and the target background data, the gray values ​​of each second pixel in the third grayscale image are corrected to obtain the fourth grayscale image; Based on the pre-established correspondence between infrared detector types and image noise types, determine the target image noise type corresponding to the type of the target infrared detector; Based on the fourth grayscale image, a set of noise parameters corresponding to the noise type of the target image is determined, wherein the set of noise parameters includes: noise parameters corresponding to each pixel in the first grayscale image; The step of correcting the grayscale value of each first pixel based on the temperature drift and reference grayscale value of each first pixel includes: The grayscale value of each first pixel is corrected based on the noise parameters, temperature drift, and reference grayscale value corresponding to each first pixel.

5. The method according to claim 4, characterized in that, The step of correcting the grayscale values ​​of each second pixel in the third grayscale image based on the target temperature drift coefficient set and the target background data to obtain the fourth grayscale image includes: For each second pixel in the third grayscale image, the temperature drift coefficient corresponding to the second pixel is determined in the target temperature drift coefficient set, and the temperature drift amount corresponding to the second pixel is calculated based on the temperature drift coefficient, and the reference grayscale value corresponding to the second pixel is determined in the target background data. Based on the temperature drift and reference gray value of each second pixel, the gray value of each second pixel is corrected to obtain the fourth grayscale image.

6. The method according to claim 5, characterized in that, The calculation of the temperature drift amount corresponding to the second pixel based on the temperature drift coefficient includes: The product of the temperature drift coefficient and the temperature difference corresponding to the second pixel is calculated as the temperature drift amount corresponding to the second pixel, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data.

7. The method according to any one of claims 1-6, characterized in that, Before determining the reference grayscale value corresponding to the first pixel in the target background data, the method further includes: For each second pixel in the third grayscale image, a third pixel corresponding to the second pixel is determined in the target background data, and the difference in grayscale value between the second pixel and the third pixel is calculated. The second pixel and the third pixel are symmetrical about the boundary line between the photosensitive area and the non-photosensitive area. The third grayscale image is a grayscale image generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector. The time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal. The average of the obtained differences is used as the background data correction amount; For each pixel in the target background data corresponding to the photosensitive area, the reference gray value of the pixel is updated to the difference between the gray value of the pixel and the background data correction amount; Determining the reference grayscale value corresponding to the first pixel in the target background data includes: Among the updated reference gray values ​​included in the target baseline data, the reference gray value corresponding to the first pixel is determined.

8. The method according to any one of claims 1-6, characterized in that, After correcting the grayscale value of each first pixel based on the temperature drift and reference grayscale value corresponding to each first pixel to obtain a second grayscale image, the method further includes: For each fourth pixel in the second grayscale image, the gain correction coefficient corresponding to the fourth pixel is determined from a pre-calibrated set of gain correction coefficients, and the product between the gain correction coefficient corresponding to the fourth pixel and the grayscale value of the fourth pixel is calculated as the corrected grayscale value of the fourth pixel to obtain the fifth grayscale image. The set of gain correction coefficients includes the gain correction coefficients corresponding to each pixel in the grayscale image acquired by the target infrared detector.

9. The method according to claim 8, characterized in that, The set of gain correction coefficients shall be calibrated as follows: A first calibration grayscale image and a second calibration grayscale image are obtained. The first calibration grayscale image is generated based on a first calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a first temperature. The first calibration thermal radiation signal is emitted by a uniformly radiating surface at the first temperature. The second calibration grayscale image is generated based on a second calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a second temperature. The second calibration thermal radiation signal is emitted by a uniformly radiating surface at the second temperature. The first temperature and the second temperature are two temperatures within the operating temperature range of the calibration infrared detector. Calculate the average gray level of each pixel in the first calibrated grayscale image to obtain the first average gray level, and calculate the average gray level of each pixel in the second calibrated grayscale image to obtain the second average gray level; For every two pixels at the same position in the first and second calibration grayscale images, the ratio between the first grayscale difference and the second grayscale difference corresponding to the two pixels is calculated as the gain correction coefficient at that position. The first grayscale difference is the difference between the first grayscale average value and the second grayscale average value, and the second grayscale difference is the difference between the grayscale values ​​of the two pixels.

10. The method according to any one of claims 1-6, characterized in that, The correspondence between temperature, temperature drift coefficient set and background data is determined as follows: The temperature control device is controlled to adjust the internal temperature of the temperature control device according to a preset temperature change rate, and the calibrated infrared detector installed inside the temperature control device is controlled to collect data from the radiation uniform surface installed inside the temperature control device according to a preset temperature interval, so as to obtain various background data. For each pre-defined temperature range, perform the following operations to determine the set of temperature drift coefficients and background data corresponding to that temperature range: One of the background data collected by the calibrated infrared detector within the temperature range is determined as the background data corresponding to that temperature range. Among the background data collected by the calibrated infrared detector within this temperature range, the corresponding lowest relative low temperature background data and the corresponding highest relative high temperature background data are determined. For every two first-class pixels at the same position in the relatively low temperature background data and the relatively high temperature background data, a target difference between the grayscale difference between the two first-class pixels and the overall grayscale difference is calculated. The ratio between the target difference and the temperature difference of the temperature range is then calculated as the temperature drift coefficient corresponding to the pixel at that position in the background data corresponding to the temperature range. The overall grayscale difference is the average difference between the grayscale values ​​of the first-class pixels in the relatively low temperature background data and the grayscale values ​​of the first-class pixels in the relatively high temperature background data. The first-class pixels are the pixels corresponding to the photosensitive area among all the pixels included in the background data. For every two second-class pixels that are in the same position in the relatively low temperature background data and the relatively high temperature background data, the ratio between the grayscale difference between the two second-class pixels and the temperature difference of the temperature range is calculated, which is used as the temperature drift coefficient of the pixel at that position in the background data corresponding to the temperature range. The second-class pixels are the pixels that correspond to the non-photosensitive area among the pixels included in the background data. Based on the temperature drift coefficient of each pixel in the background data corresponding to the temperature range, a set of temperature drift coefficients corresponding to the temperature range is generated.

11. An infrared detection result correction device, characterized in that, The device includes: The first acquisition module is used to acquire a first grayscale image and the ambient temperature corresponding to the first grayscale image, wherein the first grayscale image is a grayscale image generated based on the first thermal radiation signal received by the photosensitive area of ​​the target infrared detector, and the ambient temperature is the ambient temperature when the photosensitive area receives the first thermal radiation signal. The calibration data query module is used to determine the target temperature drift coefficient set and target background data corresponding to the ambient temperature in the correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data, wherein the target temperature drift coefficient set includes: the temperature drift coefficient corresponding to each pixel in the target background data; The correction parameter determination module is used to determine the temperature drift coefficient corresponding to each first pixel in the first grayscale image from the target temperature drift coefficient set, calculate the temperature drift amount corresponding to the first pixel based on the temperature drift coefficient, and determine the reference grayscale value corresponding to the first pixel in the target background data. The first correction module is used to correct the gray value of each first pixel based on the temperature drift and reference gray value corresponding to each first pixel, so as to obtain the second grayscale image.

12. The apparatus according to claim 11, characterized in that, The correspondence between the pre-calibrated temperature, temperature drift coefficient set and background data includes: each temperature range and its corresponding temperature drift coefficient set and background data; the calibration data query module is specifically used to determine the target temperature range including the ambient temperature in each temperature range, and to determine the temperature drift coefficient set and background data corresponding to the target temperature range as the target temperature drift coefficient set and target background data corresponding to the ambient temperature. And / or, The correction parameter determination module is specifically used to calculate the product between the temperature drift coefficient and the temperature difference corresponding to the first pixel point, as the temperature drift amount corresponding to the first pixel point, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data. And / or, The device further includes: a second acquisition module for acquiring a third grayscale image, wherein the third grayscale image is a grayscale image generated based on a second thermal radiation signal received by a non-photosensitive area of ​​the target infrared detector, and the time at which the non-photosensitive area receives the second thermal radiation signal is the same as the time at which the photosensitive area receives the first thermal radiation signal; a second correction module for correcting the grayscale value of each second pixel in the third grayscale image based on the target temperature drift coefficient set and the target background data to obtain a fourth grayscale image; a noise type determination module for determining the target graphic noise type corresponding to the type of the target infrared detector in a pre-established correspondence between infrared detector types and graphic noise types; a noise parameter set determination module for determining the noise parameter set corresponding to the target graphic noise type based on the fourth grayscale image, wherein the noise parameter set includes: noise parameters corresponding to each pixel in the first grayscale image; and the first correction module specifically for correcting the grayscale value of each first pixel based on the noise parameters, temperature drift, and reference grayscale value corresponding to each first pixel. And / or, The second correction module includes: a correction parameter determination unit, configured to determine, for each second pixel in the third grayscale image, a temperature drift coefficient corresponding to the second pixel in the target temperature drift coefficient set, calculate the temperature drift amount corresponding to the second pixel based on the temperature drift coefficient, and determine a reference grayscale value corresponding to the second pixel in the target background data; and a correction unit, configured to correct the grayscale value of each second pixel according to the temperature drift amount and the reference grayscale value corresponding to each second pixel, to obtain a fourth grayscale image. And / or, The correction parameter determination unit is specifically used to calculate the product between the temperature drift coefficient and the temperature difference corresponding to the second pixel point, as the temperature drift amount corresponding to the second pixel point, wherein the temperature difference is the difference between the ambient temperature and the acquisition temperature of the target background data. And / or, The device further includes: a grayscale difference calculation module, used to determine the corresponding third pixel in the target background data for each second pixel in the third grayscale image, and calculate the difference in grayscale values ​​between the second pixel and the third pixel, wherein the second pixel and the third pixel are symmetrical about the boundary line between the photosensitive area and the non-photosensitive area, the third grayscale image is a grayscale image generated based on the second thermal radiation signal received by the non-photosensitive area of ​​the target infrared detector, and the time when the non-photosensitive area receives the second thermal radiation signal is the same as the time when the photosensitive area receives the first thermal radiation signal; a background data correction amount determination module, used to calculate the average value of the obtained differences as the background data correction amount; a background data correction module, used to update the reference grayscale value of each pixel in the target background data to the difference between the grayscale value of the pixel and the background data correction amount; and a correction parameter determination module, specifically used to determine the reference grayscale value corresponding to the first pixel among the updated reference grayscale values ​​included in the target background data output by the background data correction module. And / or, The device further includes: a second correction module, configured to determine the gain correction coefficient corresponding to each fourth pixel in the second grayscale image output by the first correction module from a pre-calibrated set of gain correction coefficients, and calculate the product between the gain correction coefficient corresponding to the fourth pixel and the grayscale value of the fourth pixel as the corrected grayscale value of the fourth pixel to obtain a fifth grayscale image, wherein the set of gain correction coefficients includes: the gain correction coefficients corresponding to each pixel in the grayscale image acquired by the target infrared detector; And / or, The gain correction coefficient set is calibrated as follows: A first calibration grayscale image and a second calibration grayscale image are obtained, wherein the first calibration grayscale image is generated based on a first calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a first temperature, the first calibration thermal radiation signal being emitted by a radiative homogeneous surface at the first temperature; the second calibration grayscale image is generated based on a second calibration thermal radiation signal received by the photosensitive area of ​​the calibration infrared detector at a second temperature, the second calibration thermal radiation signal being emitted by a radiative homogeneous surface at the second temperature, and the first temperature and the second temperature being the calibration infrared detector's photosensitive area at the second temperature. Two temperatures within the operating temperature range of the external detector; calculate the average gray level of each pixel in the first calibration gray level image to obtain the first average gray level, and calculate the average gray level of each pixel in the second calibration gray level image to obtain the second average gray level; for every two pixels at the same position in the first and second calibration gray level images, calculate the ratio between the first gray level difference and the second gray level difference corresponding to the two pixels, and use it as the gain correction coefficient at that position, wherein the first gray level difference is the difference between the first average gray level and the second average gray level, and the second gray level difference is the difference between the gray levels of the two pixels; And / or, The correspondence between temperature, temperature drift coefficient set, and background data is determined as follows: The temperature control device is controlled to adjust the internal temperature according to a preset temperature change rate, and a calibration infrared detector installed inside the temperature control device is controlled to collect data from a uniform radiation surface inside the temperature control device at preset temperature intervals to obtain various background data. For each pre-divided temperature range, the following operations are performed to determine the temperature drift coefficient set and background data corresponding to that temperature range: one background data point collected by the calibration infrared detector within that temperature range is determined as the background data corresponding to that temperature range; among the background data collected by the calibration infrared detector within that temperature range, the lowest relative low temperature background data and the highest relative high temperature background data are determined; for every two identical first-class pixels in the relative low temperature and relative high temperature background data, the grayscale difference between the two first-class pixels and the overall grayscale difference is calculated. The target difference is calculated, and the ratio between the target difference and the temperature difference within the temperature range is used as the temperature drift coefficient for the pixel at that location in the background data corresponding to the temperature range. The overall grayscale difference is the average difference between the grayscale values ​​of the first type of pixels in the relatively low-temperature background data and the grayscale values ​​of the first type of pixels in the relatively high-temperature background data. The first type of pixels are those corresponding to the photosensitive area among all pixels included in the background data. For every two second type of pixels at the same location in the relatively low-temperature and relatively high-temperature background data, the ratio between the grayscale difference between these two second type of pixels and the temperature difference within the temperature range is calculated. This ratio is used as the temperature drift coefficient for the pixel at that location in the background data corresponding to the temperature range. The second type of pixels are those corresponding to the non-photosensitive area among all pixels included in the background data. Based on the temperature drift coefficients of each pixel in the background data corresponding to the temperature range, a set of temperature drift coefficients corresponding to the temperature range is generated.

13. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-10.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-10.