Non-uniformity compensation method and device based on gray scale difference of baffle and readable storage medium thereof
By introducing a dynamic compensation method based on the grayscale difference of the baffle into infrared thermal imaging equipment, the non-uniformity problem caused by temperature drift is solved, improving image stability and user experience, and extending the equipment life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-24
AI Technical Summary
Existing infrared thermal imaging equipment suffers from non-uniformity issues caused by temperature drift. Current technologies require frequent single-point corrections, leading to image interruptions and wear on the baffle, which affects user experience and equipment lifespan.
By pre-calibrating the grayscale difference images of the baffles in different temperature ranges, and combining the current temperature with the reference temperature difference to calculate the dynamic compensation coefficient, a compensation term for real-time temperature drift adjustment is introduced to eliminate the influence of temperature drift.
It achieves image quality stability and continuity, reduces the frequency of single-point correction, and extends equipment life.
Smart Images

Figure CN121280299B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital image processing technology, specifically relating to infrared thermal imaging technology, and in particular to a non-uniformity compensation method, device and readable storage medium based on the gray-scale difference of a baffle. Background Technology
[0002] Infrared thermal imaging technology, with its passive detection and all-weather operation capabilities, has been widely used in military reconnaissance, security monitoring, industrial temperature measurement, and medical diagnosis. However, due to the limitations of the material properties and manufacturing process of infrared focal plane array (FPA) detectors, different pixels respond differently to infrared radiation, resulting in inherent non-uniformity in the output infrared images, i.e., fixed pattern noise (FPN), which seriously affects image quality and subsequent processing.
[0003] Currently, the industry widely adopts calibration-based non-uniformity compensation (NUC) technology. A common approach combines two-point and single-point calibration. Two-point calibration is typically performed in a laboratory environment, by acquiring images of both a high-temperature and low-temperature blackbody and calculating the gain coefficient for each pixel. And the initial offset. Single-point correction, on the other hand, occurs while the device is running, by using a built-in baffle to obstruct the field of view (e.g., ...). Figure 6 The baffle mechanism 1, also known as the zero-adjustment baffle, is a baffle device in front of the detector. It can be understood as placing a uniform object in front of the detector (the detector collects data from the uniform object for single-point calibration), and acquiring a uniform baffle image as the offset. In actual operation, the system uses the following formula to process the original image. Perform correction:
[0004]
[0005] in, This is the corrected output image.
[0006] However, the aforementioned existing technical solutions have a significant drawback: the response characteristics of infrared detector pixels are highly sensitive to operating temperature. As the device operates for an extended period, its internal temperature changes (i.e., "temperature drift"), leading to variations in the accuracy acquired during single-point calibration. As the image gradually fails, non-uniformity will reappear in the image. To address this issue, existing equipment can only employ a strategy of frequent single-point correction, but this leads to frequent image interruptions (baffle action), severely impacting the user's continuous observation experience and accelerating the wear of the baffle's mechanical structure, thus shortening the equipment's lifespan. Summary of the Invention
[0007] This invention provides a method, apparatus, and readable storage medium for non-uniformity compensation based on the grayscale difference of a baffle plate. The invention addresses the problem that existing technologies cannot effectively compensate for non-uniformity changes caused by device temperature drift. If single-point correction is frequently performed to maintain image quality, it will lead to problems such as image interruption and accelerated wear of the baffle plate.
[0008] The core technology of this invention is to pre-calibrate the grayscale difference images of the baffles in different temperature ranges and calculate the dynamic compensation coefficient by combining the difference between the current temperature and the previous correction temperature. This introduces a compensation term that adjusts in real time with temperature drift into the standard correction formula to eliminate the influence of temperature drift on non-uniformity.
[0009] In a first aspect, the present invention provides a non-uniformity compensation method based on the gray-scale difference of a baffle, which compensates the original image based on a pre-stored gain coefficient matrix and a reference offset image obtained at a reference temperature. The method further includes the following steps:
[0010] Obtain at least one preset temperature range corresponding to the baffle grayscale difference image. The baffle grayscale difference image is used to characterize the non-uniformity change characteristics with temperature.
[0011] Get the current device temperature and current raw image at runtime;
[0012] A compensation coefficient is calculated based on the difference between the current equipment temperature and the reference temperature.
[0013] A temperature drift compensation term is calculated based on the grayscale difference image of the baffle and the compensation coefficient.
[0014] The original image is compensated, and the compensation process includes:
[0015] The intermediate result is obtained by subtracting the reference offset image and temperature drift compensation term from the current original image, and then processing the intermediate result using the gain coefficient matrix to obtain the compensated image.
[0016] Furthermore, the steps for obtaining the grayscale difference image of the baffle include:
[0017] Within a preset temperature range, grayscale images of the high-temperature baffle and the low-temperature baffle were acquired respectively.
[0018] The grayscale difference image of the high-temperature baffle is obtained by subtracting the grayscale image of the low-temperature baffle.
[0019] Furthermore, it also includes:
[0020] Based on the current equipment temperature, the temperature range to which the current equipment temperature belongs is found from multiple pre-stored temperature ranges; the grayscale difference image of the baffle corresponding to the found temperature range is obtained and used to calculate the temperature drift compensation term.
[0021] Furthermore, the steps for calculating the compensation coefficient include: obtaining the temperature span of the preset temperature range to which the current equipment temperature belongs, where the temperature span is the difference between the upper and lower temperature limits of the range; and dividing the difference between the current equipment temperature and the reference temperature by the temperature span to obtain the compensation coefficient.
[0022] Furthermore, the compensated image It is calculated in the following way:
[0023]
[0024] in, For pixel coordinates, For the current original image, As a reference offset image, This is a grayscale difference image of the baffle. For compensation coefficient, This is the gain coefficient matrix.
[0025] Furthermore, the reference offset image and reference temperature are updated when the device temperature changes too rapidly or the image quality deteriorates significantly.
[0026] Secondly, the present invention provides a non-uniformity compensation device based on the grayscale difference of a baffle plate, comprising:
[0027] The storage module is used to store the gain coefficient matrix, the reference offset image obtained at the reference temperature, and the baffle grayscale difference image corresponding to at least one preset temperature range.
[0028] The status acquisition module is used to acquire the current device temperature and the current raw image during runtime;
[0029] The compensation coefficient calculation module is used to calculate a compensation coefficient based on the difference between the current equipment temperature and the reference temperature.
[0030] The compensation module is used to calculate a temperature drift compensation term based on the grayscale difference image of the baffle and the compensation coefficient, and to compensate the current original image. The compensation process includes:
[0031] The intermediate result is obtained by subtracting the reference offset image and temperature drift compensation term from the current original image, and then processing the intermediate result using the gain coefficient matrix to obtain the compensated image.
[0032] Furthermore, the compensation coefficient calculation module is also configured as follows:
[0033] Get the temperature span of the preset temperature range to which the current device temperature belongs. The temperature span is the difference between the upper limit temperature and the lower limit temperature of the range.
[0034] The compensation coefficient is obtained by dividing the difference between the current equipment temperature and the reference temperature by the temperature range.
[0035] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described non-uniformity compensation method based on the grayscale difference of the baffle.
[0036] Fourthly, the present invention provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the above-described non-uniformity compensation method based on the baffle grayscale difference.
[0037] The main contributions and innovations of this invention are as follows:
[0038] 1. Improved image stability: By introducing a dynamic compensation term based on temperature drift, the present invention can correct the non-uniformity caused by changes in device temperature in real time, so that the image quality remains highly uniform and stable during long-term operation.
[0039] 2. Improved user experience: This invention significantly reduces the frequency of single-point correction (baffle correction), avoiding image interruption or stuttering caused by frequent correction, and ensuring the smoothness of video and the continuity of observation.
[0040] 3. Extended equipment lifespan: Due to the significant reduction in the number of single-point calibrations, the number of mechanical movements of the baffle is also reduced, effectively slowing down the mechanical wear of the baffle assembly, thereby extending the overall service life of the infrared thermal imager.
[0041] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description
[0042] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0043] Figure 1 This is a flowchart of a non-uniformity compensation method based on the grayscale difference of baffles according to an embodiment of the present invention;
[0044] Figure 2 This is a grayscale difference compensation effect diagram of existing technology without using a baffle;
[0045] Figure 3 This is a graph showing the grayscale difference compensation effect after heating by 0.6℃ without using a baffle, based on existing technology.
[0046] Figure 4 This is a diagram illustrating the grayscale difference compensation effect of the present invention;
[0047] Figure 5 This is a diagram showing the grayscale difference compensation effect of the present invention with a temperature increase of 0.6℃;
[0048] Figure 6 This is an actual image of the baffle plate on an infrared thermal imaging device;
[0049] Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention.
[0050] In the diagram, 1 represents the baffle mechanism. Detailed Implementation
[0051] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0052] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0053] This invention provides a non-uniformity compensation technique based on baffle grayscale difference. The core idea of this technique is to introduce a dynamic compensation term related to equipment temperature drift, building upon traditional two-point and single-point corrections. This compensation term is determined jointly based on a pre-calibrated baffle grayscale difference image (st_diff) within different temperature ranges and a compensation coefficient (coff) calculated in real-time according to the current temperature.
[0054] Example 1
[0055] This embodiment details the implementation process of a non-uniformity compensation method. The method mainly consists of a preprocessing stage and a runtime compensation stage.
[0056] I. Preprocessing Stage
[0057] This stage is mainly used to obtain basic correction parameters, including two-point correction parameters (gain coefficients) and the baffle grayscale difference image unique to this invention.
[0058] Step 1: Two-point calibration (obtaining the gain coefficient) )
[0059] Under relatively stable ambient temperature (e.g., room temperature, 25℃), use the infrared thermal imaging device to be calibrated, point it at a high-temperature blackbody and a low-temperature blackbody (e.g., fixed at 1m), and acquire one high-temperature (e.g., 50℃) raw image Img_high and one low-temperature (e.g., 10℃) raw image Img_low respectively. Preferably, multiple frames can be acquired and averaged to avoid interference.
[0060] Next, calculate the average image values (e.g., grayscale average) for Img_high and Img_low respectively, denoted as . (e.g., 182) and (e.g., 95). Then, calculate each pixel using the following formula. Gain coefficient :
[0061]
[0062] in, These represent the x and y coordinates of the pixels. The calculated gain coefficient matrix... It is stored for use during subsequent runtime.
[0063] For example, for each pixel (i,j) of the infrared focal plane sensor (where i is the horizontal coordinate, ranging from 0 to 639; j is the vertical coordinate, ranging from 0 to 511), gain(i,j) is calculated according to the logic of "gain coefficient = (avg_high - avg_low) / (the gray value of the pixel in Img_high - the gray value of the pixel in Img_low)". For example, for pixel (150, 200): its grayscale value in Img_high is 210 and its grayscale value in Img_low is 88, then gain(150, 200) = (182-95) / (210-88) = 87 / 122 ≈ 0.713; for pixel (400, 350): its grayscale value in Img_high is 195 and its grayscale value in Img_low is 92, then gain(400, 350) = (182-95) / (195-92) = 87 / 103 ≈ 0.845.
[0064] Step 2: Calibrate and record the zeroing grayscale difference (obtain) )
[0065] This step is a key preparatory step in the present invention, used to obtain the characteristics of non-uniformity as a function of temperature.
[0066] First, define a temperature range, for example, in 5°C increments. Then, within multiple different operating temperature ranges of the device (e.g., 15-20°C, 20-25°C, 25-30°C, 30-35°C, 35-40°C), utilize the built-in baffle mechanism 1 of the infrared thermal imaging device (e.g., Figure 6 As shown, existing technologies will not be elaborated further), the lower limit temperature of this temperature range (denoted as) is collected respectively. The corresponding grayscale image of the baffle. And the grayscale image st_high of the baffle corresponding to the upper limit temperature of that temperature range (denoted as temp_high). For example:
[0067] For the 15-20℃ range: at the low temperature end of 15℃, the control device acquires 3 frames of baffle images and averages them to obtain the first baffle grayscale image (st_low). 15-20 At the high-temperature end of 20℃, three frames of baffle images were also acquired and averaged to obtain the second baffle grayscale image (st_high). 15-20 );
[0068] Similarly, st_low values were collected sequentially within the 20-25℃ range. 20-25 (at 20℃) and st_high 20-25 st_low (at 25℃) and in the 25-30℃ range 25-30 (at 25℃) and st_high 25-30 (At 30℃), until the image acquisition of the baffles in all intervals is completed.
[0069] Calculate the difference between the two baffle images to obtain the baffle grayscale difference image corresponding to that temperature range.
[0070]
[0071] The calculated Image matrix and its corresponding temperature range information (i.e. It is associated with temp_high and stored in the non-volatile memory of the infrared thermal imaging device or other memory for later lookup. For example:
[0072] Within the 20-25℃ temperature range, pixels (150, 200) at st_high 20-25 The grayscale value in st_low is 125. 20-25 If the grayscale value of this pixel is 105, then this pixel is in st_diff. 20-25The grayscale value in the image is 125 - 105 = 20; the pixel (400, 350) is in st_high. 20-25 The grayscale value in st_low is 118. 20-25 If the grayscale value in st_diff is 100, then its grayscale value in st_diff is... 20-25 The grayscale value is 118 - 100 = 18.
[0073] II. Runtime Compensation Phase
[0074] After completing the preprocessing stage, the infrared thermal imaging equipment enters normal operating mode. In operating mode, the system performs the following steps for real-time compensation:
[0075] Step 3: Obtain the baseline offset image (single-point correction)
[0076] Perform a single-point correction when the device is started or under specific conditions (such as when image quality deteriorates significantly). Specifically: control the baffle to block the device, acquire an original image, and record it as the reference offset image. Simultaneously, record the equipment temperature during this single-point calibration, and denote it as the reference temperature. .
[0077] and It is cached and used as a benchmark for subsequent temperature drift compensation.
[0078] Step 4: Real-time temperature drift compensation
[0079] The system acquires the current raw images in real time while the device is running continuously. And simultaneously obtain the current device temperature through a temperature sensor. .
[0080] Step 5: Search
[0081] Based on the current temperature Search within the multiple temperature ranges stored in step 2 to find... The temperature range in which it is located. Extract the corresponding grayscale difference image of the baffle from this range. And the upper limit temperature temp_high and lower limit temperature of this range. .
[0082] Step 6: Calculate the compensation coefficient
[0083] Based on the current temperature Reference temperature And the upper and lower limits of the found temperature range (temp_high and ), calculate the dynamic compensation coefficient
[0084]
[0085] The compensation coefficient Characterizes the current temperature relative to the last single-point correction ( The drift amplitude. For example:
[0086] temp_cur=23℃, temp_zero=22℃, temp_high=25℃, temp_low=20℃, then coff=(23-22) / (25-20)=1 / 5=0.2.
[0087] Step 7: Perform compensation
[0088] Using the information obtained in step 1 The information obtained in step 3 The information obtained in step 5 and the calculation in step 6 For the current original image Perform the final compensation calculation:
[0089]
[0090] in, This is the compensated output image. This item is the temperature drift compensation item introduced in this invention, which will be based on... The temperature is dynamically adjusted according to changes, thereby offsetting the non-uniformity caused by temperature drift. For example:
[0091] img_in is an infrared image of a uniform wall. The gray value of pixel (150,200) in img_in is 225, and the gray value of pixel (400,350) is 210. The gray value of pixel (150,200) in offset is 98, and the gray value of pixel (400,350) is 92 (offset is only updated when "the rate of temperature change exceeds 2℃ / min" or "the degree of image non-uniformity exceeds the gray standard deviation threshold of 15").
[0092] For pixels (150, 200):
[0093] img_out(150,200)=(225-98-20×0.2) 0.713 = (127 - 4) 0.713 = 123 0.713 ≈ 87.7;
[0094] For pixels (400, 350):
[0095] img_out(400,350)=(210-92-18 0.2) 0.845 = (118 - 3.6) 0.845 = 114.4 × 0.845 ≈ 96.7;
[0096] III. Implementation Results
[0097] Please refer to the attached diagram. The attached diagram shows... Figure 2 and Figure 3 It demonstrates the effectiveness of using existing technology (i.e., without temperature drift compensation). Figure 2 The image is taken immediately after single-point calibration (51.8℃). At this point, some vertical lines have appeared in the uniform area on the left side of the image. Figure 3 The image is taken after the temperature increases by 0.6℃ (to 52.4℃). At this point, the non-uniformity is aggravated, and the vertical line on the left and the horizontal line on the image become more obvious, resulting in a worse image quality.
[0098] Appendix Figure 4-5 The effect diagrams in this paper demonstrate the effect of using the technical solution of the embodiments of the present invention. Figure 4 This is the image after single-point correction; the image is uniform. Figure 5 The image shows the result after the temperature has increased. It can be seen that the overall image quality has not changed significantly and remains uniform.
[0099] As can be seen from the comparison, the present invention effectively suppresses the influence of temperature drift on non-uniformity by introducing a temperature drift compensation term.
[0100] Regarding the updating of the reference offset image: the method of the present invention does not require frequent execution of step 3 (single-point correction). and As a baseline, it can remain unchanged for a relatively long period. Step 3 only needs to be repeated to update the baseline offset image and baseline temperature when the temperature changes too rapidly or when there is a noticeable deterioration in image quality. This greatly reduces the number of baffle actions, avoids frequent image interruptions, improves visual quality, and extends baffle life.
[0101] Example 2
[0102] This embodiment provides an infrared image non-uniformity compensation device, which can be used to perform the method in Embodiment 1 above.
[0103] This device can be an infrared thermal imager, infrared monitoring equipment, etc. Internally, it includes, but is not limited to: an infrared focal plane array (for capturing raw images), a baffle mechanism 1, a temperature sensor, a storage module, and a processor.
[0104] Storage module: Used to store program instructions and various data required for execution methods, including:
[0105] 1. Gain coefficient matrix obtained in the preprocessing stage .
[0106] 2. Gray-scale difference images of the baffles corresponding to multiple temperature ranges, obtained during the preprocessing stage. and its upper and lower limit temperatures temp_high and .
[0107] 3. Baseline offset image acquired at runtime and reference temperature .
[0108] Temperature sensor (can be categorized as a status acquisition module): used to acquire the current device temperature in real time. .
[0109] Processor (which implements the functions of the compensation coefficient calculation module and the compensation module): Used to execute program instructions in the storage module to achieve:
[0110] 1. Control the infrared focal plane array to acquire the current raw image. .
[0111] 2. (Status Acquisition) Call the temperature sensor to acquire data. .
[0112] 3. (Calculation of compensation coefficient) Based on Find the corresponding temp_high and and according to and (temp_high-temp_low) calculates the compensation coefficient. .
[0113] 4. (Compensation) According to , , , and ,implement:
[0114]
[0115] Output the compensated image. .
[0116] When needed, the baffle mechanism 1 is controlled to perform single-point calibration to update... and .
[0117] Example 3
[0118] This embodiment also provides an electronic device, see reference. Figure 7 It includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.
[0119] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.
[0120] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0121] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0122] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the non-uniformity compensation methods based on the grayscale difference of the baffle in the above embodiments.
[0123] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0124] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0125] Input / output device 408 is used to input or output information.
[0126] Example 4
[0127] This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the non-uniformity compensation method based on the grayscale difference of the baffle according to Embodiment 1.
[0128] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0129] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0130] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 1 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0131] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0132] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.
Claims
1. A non-uniformity compensation method based on the gray-level difference of a baffle plate, which compensates the original image based on a pre-stored gain coefficient matrix and a reference offset image obtained at a reference temperature, characterized in that, The method also includes the following steps: Obtain at least one preset temperature range corresponding to a baffle grayscale difference image, the baffle grayscale difference image being used to characterize the non-uniformity variation with temperature; Get the current device temperature and current raw image at runtime; A compensation coefficient is calculated based on the difference between the current device temperature and the reference temperature. A temperature drift compensation term is calculated based on the grayscale difference image of the baffle and the compensation coefficient. The current original image is compensated, and the compensation process includes: The intermediate result is obtained by subtracting the reference offset image and the temperature drift compensation term from the current original image, and the intermediate result is processed using the gain coefficient matrix to obtain the compensated image. The step of calculating the compensation coefficient includes: obtaining the temperature span of the preset temperature range to which the current device temperature belongs, wherein the temperature span is the difference between the upper limit temperature and the lower limit temperature of the range; dividing the difference between the current device temperature and the reference temperature by the temperature span to obtain the compensation coefficient.
2. The non-uniformity compensation method as described in claim 1, characterized in that, The steps to obtain the grayscale difference image of the baffle include: Within the preset temperature range, grayscale images of the high-temperature baffle and the low-temperature baffle are acquired respectively; the difference between the grayscale images of the high-temperature baffle and the low-temperature baffle is calculated to obtain the grayscale difference image of the baffle.
3. The non-uniformity compensation method as described in claim 1, characterized in that, Also includes: Based on the current device temperature, the temperature range to which the current device temperature belongs is found from multiple pre-stored temperature ranges; Obtain the grayscale difference image of the baffle corresponding to the found temperature range, and use it to calculate the temperature drift compensation term.
4. The non-uniformity compensation method as described in claim 1, characterized in that, The compensated image It is calculated in the following way: in, For pixel coordinates, For the current original image, The reference offset image, The image represents the grayscale difference of the baffle. The compensation coefficient is... Let be the gain coefficient matrix.
5. The non-uniformity compensation method as described in claim 1, characterized in that, The reference offset image and the reference temperature are updated when the device temperature changes too quickly or the image quality deteriorates significantly.
6. A non-uniformity compensation device based on the grayscale difference of a baffle plate, characterized in that, include: The storage module is used to store the gain coefficient matrix, the reference offset image obtained at the reference temperature, and the baffle grayscale difference image corresponding to at least one preset temperature range. The status acquisition module is used to acquire the current device temperature and the current raw image during runtime; The compensation coefficient calculation module is used to calculate a compensation coefficient based on the difference between the current device temperature and the reference temperature. The compensation module is used to calculate a temperature drift compensation term based on the grayscale difference image of the baffle and the compensation coefficient, and to compensate the current original image. The compensation process includes: subtracting the reference offset image and the temperature drift compensation term from the current original image to obtain an intermediate result, and processing the intermediate result using the gain coefficient matrix to obtain the compensated image. The compensation coefficient calculation module is further configured as follows: Obtain the temperature span of the preset temperature range to which the current device temperature belongs, where the temperature span is the difference between the upper and lower limits of the range. The compensation coefficient is obtained by dividing the difference between the current device temperature and the reference temperature by the temperature range.
7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the non-uniformity compensation method according to any one of claims 1 to 5.
8. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the non-uniformity compensation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Fast drift compensation method for infrared radiation calibration system
CN120063501A