A method and apparatus for correcting an infrared image
By employing inter-frame registration and response drift state updates, the real-time online correction problem of infrared imaging systems is solved, adapting to different operating conditions, improving the uniformity and recognition accuracy of infrared images, and enhancing imaging quality.
Patent Information
- Application Number
- CN202611427357.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-24
AI Technical Summary
Existing infrared imaging systems cannot achieve real-time online calibration and can only be adapted to fixed working conditions. When the detector operates for a long time and temperature drift occurs, or when the optical system experiences vignetting distortion, the calibration parameters will quickly become invalid, the calibration accuracy will drop significantly, and the adaptability to working conditions will be extremely poor.
By performing inter-frame registration between the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system, subtracting pixel by pixel, selecting the effective observation area, extracting image partitions based on the historical registration residual image, updating the response drift state, including the bias drift, gain drift and radial vignetting multiplicative distortion parameters, correcting them, and inputting them into the pre-trained recognition model.
It breaks through the limitations of traditional correction techniques, adapts to pixel offset drift, gain drift and optical radial vignetting multiplicative distortion, improves the overall uniformity and clarity of infrared images, improves imaging quality, and enhances the accuracy and stability of infrared target recognition.
Smart Images

Figure CN123160397A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of image processing, and particularly relates to a method and apparatus for correcting infrared images. Background Technology
[0002] Infrared imaging technology, with its advantages of all-weather operation, anti-interference, and strong concealment, is widely used in many fields such as security monitoring, aerial detection, industrial inspection, and intelligent identification. The core imaging device of an infrared imaging system is the infrared focal plane detector. Due to multiple factors such as differences in detector manufacturing processes, device operating temperature drift, vignetting effect of the optical system, and circuit readout noise, the photoelectric response characteristics of each pixel unit of the detector have inherent differences, resulting in non-uniformity in the infrared images output by the system.
[0003] This image non-uniformity is mainly manifested in defects such as fixed pattern noise, bright and dark stripes, radial brightness distortion, and pixel response drift. It will seriously reduce the imaging clarity and detail recognition of infrared images, cover up the effective features of targets, and greatly affect the computational accuracy and reliability of subsequent intelligent algorithms such as target detection, classification, and recognition. It is one of the core problems restricting the high-precision intelligent application of infrared imaging systems.
[0004] Currently, infrared image non-uniformity correction techniques are mainly divided into two categories: blackbody calibration-based correction techniques and scene-based adaptive correction techniques. Among them, traditional blackbody calibration correction techniques rely on dedicated blackbody equipment to complete the calibration, which requires interrupting normal imaging work, making it impossible to achieve real-time online correction. Moreover, it can only be adapted to fixed working conditions. When the detector operates for a long time and experiences temperature drift or vignetting distortion in the optical system, the calibration parameters will quickly become invalid, the correction accuracy will drop significantly, and the adaptability to working conditions will be extremely poor. Summary of the Invention
[0005] In view of this, the present invention provides an infrared image correction method and apparatus to solve the technical problems of existing technologies that cannot achieve real-time online correction, can only be adapted to fixed working conditions, and when the detector operates for a long time and temperature drift occurs, or the optical system experiences vignetting distortion, the calibration parameters will quickly fail, the correction accuracy will drop significantly, and the adaptability to working conditions will be extremely poor.
[0006] A first aspect of the present invention provides a method for correcting infrared images, the method comprising:
[0007] Inter-frame registration is performed between the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system. The registered previous frame infrared image and the registered current frame infrared image are subtracted pixel by pixel in the same coordinate system to obtain the current registration residual image.
[0008] Select an effective observation region from the current registration residual image; wherein, the effective observation region refers to a region that meets the corresponding preset conditions;
[0009] Based on historical registration residual images, extract image partitions from the current registration residual image;
[0010] The response drift state of each image partition is updated based on the registration residual within the effective observation area; wherein, the response drift state includes the bias drift of each image partition, the gain drift of each image partition, and the radial multiplicative distortion parameter characterizing radial vignetting multiplicative distortion.
[0011] The current frame infrared image is corrected according to the updated response drift state to obtain the corrected image of the current frame. The corrected image is then input into a pre-trained recognition model to obtain the recognition result of the infrared image.
[0012] Furthermore, the step of selecting an effective observation region from the current registration residual image includes:
[0013] The current frame infrared image is divided into multiple image sub-blocks of the same size;
[0014] For each image sub-block, search for the matching sub-block with the most similar grayscale distribution in the previous frame of infrared image, and use the positional offset between the image sub-block and its matching sub-block as the local motion vector of the image sub-block.
[0015] Image sub-blocks whose magnitude of the local motion vector is greater than a preset first threshold are marked as motion sub-blocks;
[0016] Calculate the mean magnitude of the pixel grayscale gradient within each of the motion sub-blocks, and mark the motion sub-blocks whose mean magnitude is greater than a preset second threshold as texture sub-blocks;
[0017] The regions containing all the texture sub-blocks are merged into the effective observation region.
[0018] Furthermore, the step of merging the regions containing all the texture sub-blocks as the effective observation region includes:
[0019] The initial region is obtained by merging the regions containing all the texture sub-blocks.
[0020] Acquire historical frame infrared images for a consecutive preset number of frames;
[0021] The residual values of the same pixel in the historical frame infrared image and the current frame infrared image are arranged in chronological order to obtain the residual time series of each pixel;
[0022] For each pixel, the proportion of residuals in the residual time series of that pixel that maintain a consistent sign is calculated, and this proportion is taken as the sign consistency rate of that pixel.
[0023] Pixels in the initial region whose symbol consistency rate is greater than a preset third threshold are marked as drift evidence pixels, and pixels in the initial region that are not marked as drift evidence pixels are removed from the initial region to obtain the effective observation region.
[0024] Furthermore, the step of extracting image partitions from the current registration residual image based on the historical registration residual image includes:
[0025] Obtain historical registration residual images for a consecutive preset number of frames, wherein the historical registration residual images are registration residual images cached and saved during the previously performed inter-frame registration process;
[0026] The residual values of the same pixel in each of the historical registration residual images are arranged in chronological order according to pixel position to obtain the residual time series of each pixel;
[0027] Calculate the correlation coefficient between the residual time series of any two pixels;
[0028] Two pixels whose correlation coefficient is greater than a preset fourth threshold are assigned to the same candidate pixel set, and multiple candidate pixel sets are used as image partitions of the current registration residual image.
[0029] Furthermore, the step of updating the response drift state of each image partition based on the registration residual within the effective observation area includes:
[0030] For each image partition, the registration residual values of each pixel within that image partition that falls into the effective observation area are collected;
[0031] Collect the grayscale values of pixels at the same positions as each of the aforementioned pixels in the current frame infrared image;
[0032] Using the gray value of each pixel as the independent variable and the registration residual value of that pixel as the dependent variable, linear regression is performed on the data of all pixels in the image partition to obtain the regression slope and regression intercept.
[0033] The regression slope is used as the gain drift update amount for the image partition, and the regression intercept is used as the bias drift update amount for the image partition.
[0034] The gain drift update amount is weighted and fused with the historical gain drift amount currently stored in the image partition according to a preset update rate to obtain the current gain drift amount of the image partition after the update; wherein, the historical gain drift amount refers to the gain drift amount obtained by iteratively at historical time points;
[0035] The offset drift update amount is weighted and fused with the historical offset drift amount currently stored in the image partition according to a preset update rate to obtain the current offset drift amount of the image partition after the update; wherein, the historical offset drift amount refers to the offset drift amount obtained by iteration at historical time points;
[0036] Calculate the radial multiplicative distortion parameters based on the current bias drift.
[0037] Furthermore, the step of calculating the radial multiplicative distortion parameter based on the current bias drift includes:
[0038] Using the center of the current frame infrared image as the origin, calculate the radial distance from the center of each image partition to the origin;
[0039] Using the radial distance as the independent variable and the current gain drift after each image partition update as the dependent variable, a polynomial fitting of a preset order is performed to obtain the radial gain fitting function.
[0040] The polynomial coefficients of the radial gain fitting function are used as vignetting coefficients, and the vignetting coefficients are updated to the radial multiplicative distortion parameters.
[0041] Further, the step of performing correction on the current frame infrared image based on the updated response drift state to obtain the corrected image of the current frame, and inputting the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image includes:
[0042] For each pixel in the current frame infrared image, subtract the current offset drift of the image partition to which the pixel belongs;
[0043] The grayscale value of the pixel is compensated in reverse according to the current gain drift of the image partition to which the pixel belongs;
[0044] The grayscale value of the pixel is multiplicatively inversely compensated according to the radial multiplicative distortion parameter corresponding to the radial distance from the pixel to the center of the image, so as to obtain the corrected image of the current frame;
[0045] The corrected image is input into a pre-trained recognition model to obtain the recognition result of the infrared image.
[0046] Furthermore, following the steps described above, the following is also included:
[0047] After performing inter-frame registration on the current frame corrected image and the previous frame corrected image, the images are subtracted pixel by pixel to obtain the inter-frame residual image; wherein, the previous frame corrected image is an image cached after the previous frame infrared image has been corrected;
[0048] Calculate the mean absolute value of the residuals of the pixels in the inter-frame residual image that fall into the effective observation area, and use this mean value as the correction quality index;
[0049] When the correction quality index is higher than the upper limit of the preset index range, the update rate is increased by a preset ratio; wherein, the update rate is used to control the fusion ratio of the update amount and the existing state value during the response drift state update process of the next frame of infrared image;
[0050] When the correction quality index is lower than the lower limit of the preset index range, the update rate will be reduced by the preset ratio;
[0051] When the correction quality index is within the preset index range, the update rate remains unchanged.
[0052] A second aspect of the present invention provides an infrared image correction apparatus, comprising:
[0053] The registration unit is used to perform inter-frame registration between the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system. The registered previous frame infrared image and the registered current frame infrared image are subtracted pixel by pixel in the same coordinate system to obtain the current registration residual image.
[0054] The selection unit is used to select an effective observation region from the current registration residual image; wherein, the effective observation region refers to a region that meets the corresponding preset conditions;
[0055] The extraction unit is used to extract image partitions from the current registration residual image based on the historical registration residual image;
[0056] The update unit is used to update the response drift state of each image partition based on the registration residual within the effective observation area; wherein the response drift state includes the bias drift of each image partition, the gain drift of each image partition, and the radial multiplicative distortion parameter characterizing the radial vignetting multiplicative distortion.
[0057] The correction unit is used to perform correction on the current frame infrared image according to the updated response drift state, to obtain the corrected image of the current frame, and input the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image.
[0058] A third aspect of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the infrared image correction method described in the first aspect above.
[0059] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the infrared image correction method described in the first aspect.
[0060] The beneficial effects of this invention compared to existing technologies are as follows: It simultaneously adapts to three core non-uniformity problems: pixel bias drift, gain drift, and optical radial vignetting multiplicative distortion. This overcomes the limitation of traditional correction techniques that can only correct single types of noise, covering various typical non-uniform distortions generated during the operation of infrared imaging systems. It completely eliminates imaging defects such as fixed pattern noise, radial brightness unevenness, and inconsistent pixel response, significantly improving the overall uniformity, clarity, and detail reproduction of infrared images, thus fundamentally improving the imaging quality of infrared images. Abandoning the traditional globally unified parameter update mode, it combines image partitioning characteristics and an effective observation area screening mechanism to eliminate interference factors such as invalid areas, scene abrupt changes, and stray noise. It relies solely on effective image data to complete the iterative update of correction parameters, effectively avoiding common problems such as ghosting, over-correction, and correction lag. This allows the correction parameters to dynamically and adaptively adjust to the real-time distortion state of different image regions, adapting to complex and ever-changing imaging scenarios, and significantly improving correction robustness. This invention, based on high-precision non-uniformity correction of images, directly inputs the optimized high-quality images into the pre-trained recognition model, avoiding the recognition deviation problems caused by feature distortion and lack of details in traditional correction images. This makes the image features input into the recognition model more realistic, complete, and standardized, highly matching the model training feature distribution, effectively improving the accuracy, precision, and stability of infrared target recognition, and adapting to various high-precision infrared intelligent recognition scenarios. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 A schematic flowchart of an infrared image correction method provided by the present invention is shown;
[0063] Figure 2 A schematic diagram of an infrared image correction device according to an embodiment of the present invention is shown;
[0064] Figure 3 A schematic diagram of a terminal device according to an embodiment of the present invention is shown;
[0065] Figure 4This invention provides a flowchart illustrating a specific implementation of step 102 in a method for correcting non-uniformity in infrared images.
[0066] Figure 5 This invention provides a flowchart illustrating a specific implementation of step B5 in a method for correcting non-uniformity in infrared images.
[0067] Figure 6 This invention provides a flowchart illustrating a specific implementation of step 103 in a method for correcting non-uniformity in infrared images.
[0068] Figure 7 This invention provides a flowchart illustrating a specific implementation of step 104 in a method for correcting non-uniformity in infrared images.
[0069] Figure 8 This invention provides a flowchart illustrating a specific implementation of step D7 in a method for correcting non-uniformity in infrared images.
[0070] Figure 9 This invention provides a flowchart illustrating a specific implementation of step 105 in a method for correcting non-uniformity in infrared images.
[0071] Figure 10 The flowchart illustrates a specific implementation of step 106 in a method for infrared image non-uniformity correction provided by the present invention. Detailed Implementation
[0072] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0073] This invention provides a method and apparatus for correcting infrared images, which solves the technical problems of existing technologies that cannot achieve real-time online correction, can only be adapted to fixed working conditions, and cause calibration parameters to quickly fail and correction accuracy to drop significantly when the detector operates for a long time and temperature drift occurs or the optical system develops vignetting distortion, resulting in extremely poor adaptability to working conditions.
[0074] First, this invention provides a method for correcting infrared images. Please refer to [link / reference]. Figure 1 , Figure 1 A schematic flowchart of an infrared image correction method provided by the present invention is shown. Figure 1 As shown, the method for correcting this infrared image may include the following steps:
[0075] Step 101: Perform inter-frame registration on the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system. Subtract the registered previous frame infrared image and the registered current frame infrared image pixel by pixel in the same coordinate system to obtain the current registration residual image.
[0076] The response characteristics of each detection unit in an infrared focal plane array slowly drift with device temperature, integration time, and operating duration. Factory calibration parameters no longer match the current response after prolonged operation, resulting in fixed striped and blocky non-uniformity in the image. This step utilizes the scene itself as a correction source, performing inter-frame registration on two consecutive infrared images and then subtracting pixel by pixel. The components in the registration residual image can be divided into three categories: ① residuals where scene motion was not completely eliminated by registration, with spatial distribution concentrated near the scene motion boundary, and amplitude related to the accuracy of local motion compensation; ② residuals introduced by detector response drift, with spatial distribution bound to the detector unit position, accumulating slowly over time and related to pixel grayscale levels; ③ temporal noise residuals, with a mean of zero and independent between frames. Scene residuals and noise residuals lack temporal persistence, while response drift residuals maintain a stable sign and spatial structure across multiple consecutive frames. Therefore, the registration residual image constitutes a natural observation of response drift, and subsequent steps use this observation as input.
[0077] Step 102: Select an effective observation region from the current registration residual image; wherein, the effective observation region refers to the region that meets the corresponding preset conditions;
[0078] Not all pixels in the residual image carry reliable drift information. Flat regions have a small grayscale dynamic range, and the registration residuals are primarily noise, resulting in large variance in the slope estimates obtained from regression of these pixels. In regions with rapid motion, registration errors can overwhelm the drift residuals, leading to systematic biases in the estimation. The principle for selecting effective observation areas is to retain pixels that simultaneously possess clear motion, rich texture, and temporally consistent drift evidence, while discarding the remaining pixels, thus ensuring the observation quality of drift state updates from the input end.
[0079] Specifically, step 102 includes steps B1 to B5:
[0080] Figure 4 The following is a flowchart illustrating a specific implementation of step 102 in the infrared image non-uniformity correction method provided by the present invention:
[0081] Step B1: Divide the current frame infrared image into multiple image sub-blocks of the same size;
[0082] Image sub-blocks are the basic units for subsequent motion estimation and texture measurement. For example, the sub-block size ranges from 8×8 to 32×32 pixels, with a possible value of 16×16 pixels, seamlessly dividing the entire image along the row and column directions. If the sub-block is too small, the grayscale statistics within the block are unstable, leading to mismatches in motion search; if the sub-block is too large, the spatial resolution of local motion is insufficient, and mixed motion within the block can result in compromises in matching positions. A 16×16 pixel sub-block balances statistical stability and spatial resolution at a typical resolution of 640×512.
[0083] Step B2: For each image sub-block, search for the matching sub-block in the previous frame of infrared image that is most similar to the gray-scale distribution of the image sub-block, and use the positional offset between the image sub-block and its matching sub-block as the local motion vector of the image sub-block.
[0084] The search employs a block-based matching method, with the similarity metric being the sum of the absolute values of the grayscale differences between sub-blocks. The search window is centered on the corresponding position in the previous frame; for example, the search radius ranges from 4 to 12 pixels, with a possible value of 8 pixels to cover the general motion amplitude of the scene between adjacent frames. After matching, the difference between the top-left corner coordinates of the current frame's sub-block and the top-left corner coordinates of the matched sub-block is the local motion vector of that sub-block. Matching is performed in grayscale space, and the low-frequency grayscale shift introduced by drift has a much smaller impact on the similarity metric than scene structural differences; the matching result primarily reflects the actual motion of the scene.
[0085] As an optional embodiment of this application, the local motion vector can also be estimated using a coarse-to-fine pyramid optical flow method, that is, first estimating a coarse motion on the downsampled image, and then refining it layer by layer to the original resolution. This method is more robust to large-amplitude motions, and the computational cost is about one-third that of the block matching method, making it suitable for airborne and vehicle-mounted platforms with large motion amplitudes.
[0086] Step B3: Mark the image sub-blocks whose local motion vector magnitude is greater than a preset first threshold as motion sub-blocks;
[0087] Sub-blocks with a modulus close to zero indicate that the region is essentially stationary between two frames. While stationary regions are unaffected by scene motion, their grayscale levels remain largely unchanged, failing to provide observational samples covering the dynamic range of grayscale. For example, the first threshold ranges from 1.0 to 3.0 pixels, and can be 1.5 pixels. Only moving sub-blocks are retained, ensuring that the grayscale distribution of pixels participating in subsequent processing changes significantly over time, providing a basis for the distribution of independent variables in the regression estimation of gain drift.
[0088] Step B4: Calculate the mean magnitude of the pixel grayscale gradient within each of the motion sub-blocks, and mark the motion sub-blocks whose mean magnitude is greater than a preset second threshold as texture sub-blocks;
[0089] The grayscale gradient is calculated using the Sobel operator, and the mean of the gradient magnitudes of all pixels within a sub-block reflects the texture richness of that region. Even when moving, sub-blocks with poor texture exhibit limited grayscale dynamic range, with regression variables concentrated within a narrow grayscale interval, resulting in low confidence in slope estimation. For example, the second threshold is set between 5 and 15 grayscale levels, with a possible value of 8 grayscale levels. This value has been statistically validated on multiple typical infrared scenes; sub-blocks with values higher than this threshold contain at least one distinct edge within a 16×16 pixel window, and the grayscale standard deviation of the regression samples reaches more than 10% of their mean.
[0090] Step B5: Merge the regions containing all the texture sub-blocks into the effective observation region.
[0091] The region obtained by directly merging texture sub-blocks may still contain two types of contaminated pixels: one type is pixels with local registration failures, and the other type is pixels that change slowly in the scene itself. Although the residuals of these two types of pixels come from the scene, they exhibit persistence similar to drift in time. If they are not removed, they will introduce systematic bias in the bias drift estimation. Therefore, step B5 is further expanded into the following steps.
[0092] Specifically, step B5 includes steps B51 to B55:
[0093] Figure 5 The following is a flowchart illustrating a specific implementation of step B5 in a method for infrared image non-uniformity correction provided by the present invention:
[0094] Step B51: Merge the regions containing all the texture sub-blocks to obtain the initial region;
[0095] The merging method involves taking the union of all texture sub-blocks, and merging adjacent sub-blocks that share boundary pixels using a logical OR operation. The initial region has completed the spatial dimension filtering; the temporal dimension filtering will be completed in subsequent steps.
[0096] Step B52: Acquire historical frame infrared images for a consecutive preset number of frames;
[0097] Historical frame infrared images are derived from the frame buffer of the infrared imaging system. For example, the preset frame number ranges from 16 to 48 frames, with a possible value of 32 frames. At a frame rate of 25 frames per second, this equates to approximately 1.3 seconds of observation history. If the frame number is too short, the sample size for symbol statistics is insufficient, resulting in a large variance in the estimated symbol consistency rate; if the frame number is too long, buffer usage and computational latency increase, and observations from too far back become less relevant to the current drift state.
[0098] Step B53: Arrange the residual values of the same pixel in the historical frame infrared image and the current frame infrared image in chronological order to obtain the residual time series of each pixel;
[0099] Each historical frame has already undergone registration subtraction with its predecessor during acquisition. The residual values are aligned by pixel position and cached. This step directly concatenates the cached values with the current residual in chronological order to obtain a residual time series with a length equal to the preset number of frames for each pixel. The time series depicts the evolution trajectory of the pixel residual over time. Drift residuals are characterized by the continuous presence of the same sign in the sequence, while noisy residuals are characterized by alternating positive and negative signs.
[0100] Step B54: For each pixel, calculate the proportion of residuals in the residual time series that maintain a consistent sign, and use this proportion as the sign consistency rate of that pixel;
[0101] The symbol consistency rate is used to distinguish between persistent and random residuals. Residuals caused by time-domain noise have an equal probability of being positive or negative, and their expected symbol consistency rate is close to zero. Residuals caused by drift maintain a consistent symbol throughout the entire sequence, and their symbol consistency rate is close to one. The statistical method involves taking the sign of each item in the sequence, calculating the algebraic sum, taking the absolute value, and dividing by the sequence length. The result is a value between 0 and 1. For example, the preset third threshold used to determine symbol consistency is between 0.6 and 0.8, and can be 0.7. This value is determined based on statistical simulation of a 32-frame sequence. Under the assumption of independent and identically distributed noise, the probability of a random sequence's symbol consistency rate exceeding 0.7 is less than one percent, and the probability of false retention is suppressed to a negligible level.
[0102] Step B55: Mark the pixels in the initial region whose symbol consistency rate is greater than a preset third threshold as drift evidence pixels, and remove the pixels in the initial region that are not marked as drift evidence pixels from the initial region to obtain the effective observation region.
[0103] After the removal operation is completed, each pixel in the effective observation area simultaneously satisfies the spatial motion and texture conditions as well as the temporal sign consistency condition. Taking a typical 640×512 urban road infrared image as an example, the initial area contains about 30% of the pixels. After sign consistency filtering, the effective observation area retains about 12% of the pixels. The residual observations of these pixels have both spatial representativeness and temporal reliability.
[0104] In the embodiments corresponding to steps B51 to B55, spatial filtering and temporal filtering are completed in cascade, texture merging provides candidate space, symbol consistency rate eliminates persistent scene contamination, and the final effective observation area provides high-quality observation samples for drift state updates, thus suppressing the interference of scene residue on drift estimation from the source.
[0105] In the embodiments corresponding to steps B1 to B5, the observation conditions are tightened step by step through block division, motion screening, texture screening and sign consistency screening. Each level of screening has a clear physical basis. Motion conditions ensure gray-scale dispersion, texture conditions ensure regression confidence, and sign consistency conditions ensure temporal continuity. The effective observation area after multi-level screening significantly reduces the variance and bias of subsequent drift estimation.
[0106] Step 103: Based on the historical registration residual image, extract the image partitions in the current registration residual image;
[0107] The response drift of the detection unit is not independent pixel-by-pixel. The manufacturing process of the focal plane array often results in adjacent units, units in the same column, and even groups of units powered by the same bias circuit exhibiting similar drift trajectories. If the drift parameters are estimated independently for each pixel, only one short time series is available for each pixel, leading to large estimation variance and susceptibility to noise interference. This step utilizes the correlation between residual time series to aggregate pixels into image partitions. Pixels within the same partition share a set of drift parameters, expanding the number of observation samples from single-pixel sequences to the entire set of pixels in the partition, thereby significantly reducing the estimation variance.
[0108] Specifically, step 103 includes steps C1 to C4:
[0109] Figure 6 The following is a flowchart illustrating a specific implementation of step 103 in the infrared image non-uniformity correction method provided by the present invention:
[0110] Step C1: Obtain historical registration residual images for a consecutive preset number of frames, wherein the historical registration residual images are registration residual images cached and saved during the previously performed inter-frame registration process;
[0111] The historical registration residual images come from the circular buffer in step 101. After each frame is processed, the current registration residual image is written to the buffer and the oldest frame is evicted. For example, the buffer depth is consistent with the preset number of frames in step B52, and the value can be 32 frames. The buffer is gradually filled during the system initialization phase. When it is not full, subsequent statistics are performed only based on the already cached frames.
[0112] Step C2: Arrange the residual values of the same pixel in each of the historical registration residual images in chronological order according to pixel position to obtain the residual time series of each pixel;
[0113] The length of the residual time series is the same as the cache depth, and this series is a direct record of the pixel response drift history. The series here shares the same cache data as the series in step B53, but their uses are different. The series in step B53 is used for pixel-level symbol statistics, while the series in this step is used for inter-pixel correlation measurement. Neither of them incurs additional computational or storage overhead.
[0114] Step C3: Calculate the correlation coefficient between the residual time series of any two pixels;
[0115] The correlation coefficient used is the Pearson linear correlation coefficient. Calculations are performed only among pixels within the effective observation area, and the correlation matrix is updated incrementally using a sliding method, updating the corresponding row and column only once when a new residual is written to the cache. To reduce computational cost, a coarse screening of the sequence can be performed first; pixels with variance below a preset lower limit are excluded from correlation calculations, as their drift information is weak and their removal has no substantial impact on the partitioning results. When implemented in parallel using a field-programmable gate array (FPGA), the overhead per frame is proportional to the square of the number of pixels, and after coarse screening, it is controllable at typical resolutions.
[0116] As an optional embodiment of this application, the correlation measure can also be the Spearman rank correlation coefficient, that is, first perform rank transformation on the two residual time series respectively, and then calculate the linear correlation coefficient on the rank series. Rank correlation is not sensitive to outliers in the series and is more robust in the case of individual registration failure frames in the cache, at the cost of the additional sorting overhead introduced by the rank transformation.
[0117] Step C4: Divide the two pixels whose correlation coefficient is greater than the preset fourth threshold into the same candidate pixel set, and use the multiple candidate pixel sets as the image partitions of the current registration residual image.
[0118] The partitioning is implemented using a disjoint-set data structure. Pixel pairs with correlation coefficients exceeding a threshold are merged, ultimately forming a candidate pixel set for each connected component. For example, the fourth threshold ranges from 0.75 to 0.90, and can be 0.85. If the threshold is too low, pixels with different drift characteristics are mistakenly merged into the same partition, leading to partitioning model mismatch; if the threshold is too high, partitioning becomes fragmented, resulting in insufficient sample size for each partition. For example, the number of partitions is typically between 20 and 60, and the partitioning results are updated every 8 frames, using the previous partitioning within the update interval.
[0119] In the embodiments corresponding to steps C1 to C4, cache reuse, sequence alignment, correlation measurement and disjoint-set clustering constitute a complete partition extraction chain, aggregating pixel-level observations into partition-level observations, laying a data foundation for robust estimation of drift parameters.
[0120] Step 104: Update the response drift state of each image partition based on the registration residuals within the effective observation area; wherein, the response drift state includes the bias drift of each image partition, the gain drift of each image partition, and the radial multiplicative distortion parameter characterizing radial vignetting multiplicative distortion.
[0121] The response drift state is characterized by three levels of parameters. The bias drift describes the overall shift of the dark output level of the detection unit; the gain drift describes the change in the response slope; and the radial multiplicative distortion parameter describes the radial gain redistribution caused by lens vignetting due to changes in focal plane temperature. All three parameters are observed from registration residuals, and their estimation methods are differentiated: bias and gain are obtained through linear regression of the residuals on grayscale, while radial distortion is obtained by polynomial fitting of the gain drift of each partition along the radial direction. This step updates the three types of parameters level by level to form a complete drift state.
[0122] Specifically, step 104 includes steps D1 to D7:
[0123] Figure 7 The following is a flowchart illustrating a specific implementation of step 104 in the infrared image non-uniformity correction method provided by the present invention:
[0124] Step D1: For each image partition, collect the registration residual values of each pixel within that image partition that falls into the effective observation area;
[0125] The collection operation iterates through the pixels within the valid observation area by partition index and assigns the residual value to its respective partition. If the number of pixels falling within the valid observation area in a partition is less than a preset lower limit, which can be 200 pixels for example, then that partition will not be updated in this frame and will continue to use the existing drift state to avoid abnormal estimations caused by small sample regression.
[0126] Step D2: Collect the grayscale values of pixels at the same positions as each pixel in the current frame infrared image;
[0127] Gray values and residual values are paired pixel-by-pixel to form regression data pairs. The wider the range covered by gray values as independent variables, the higher the accuracy of the regression slope estimation, which is why moving sub-blocks are retained in step B3. After pairing, each partition yields a set of scatter samples with gray value as the x-axis and residual as the y-axis.
[0128] Step D3: Using the gray value of each pixel as the independent variable and the registration residual value of that pixel as the dependent variable, perform linear regression on the data of all pixels within the image partition to obtain the regression slope and regression intercept.
[0129] The regression model is r = a·g + b; where r is the registration residual, g is the pixel grayscale value, a is the regression slope, and b is the regression intercept. The physical meaning of the least squares solution is clear: after the detector unit gain shifts relative to the calibration value, the output grayscale under the same incident radiation deviates proportionally. The residual obtained by subtracting two frames is proportional to the grayscale value, and the proportionality coefficient is the slope. The bias drift manifests as a constant residual independent of the grayscale value, i.e., the intercept. Regression is performed at the partition level, with a sample size equal to the number of effective pixels within the partition, typically reaching several thousand pairs. The standard error of the slope estimation is much lower than that of the single-pixel estimation.
[0130] As an optional embodiment of this application, linear regression can also be implemented using iterative reweighted least squares, with the inverse of the studentized residual as the weight, and the weights of large residual samples are reduced round by round. This method is not sensitive to a small number of scene residual samples mixed into the effective observation area, and is suitable for situations where the screening conditions are appropriately relaxed to expand the sample coverage.
[0131] Step D4: Use the regression slope as the gain drift update amount for the image partition, and use the regression intercept as the bias drift update amount for the image partition;
[0132] The gain drift update and bias drift update are instantaneous observations of the current frame and have not yet been fused with historical data. Directly using instantaneous observations will cause jitter in the correction parameters due to single-frame noise, which will manifest as inter-frame flickering of the corrected grayscale in the image. The update amounts need to undergo subsequent weighted fusion before they can enter the drift state.
[0133] Step D5: The gain drift update amount and the historical gain drift amount currently stored in the image partition are weighted and fused according to a preset update rate to obtain the current gain drift amount of the image partition after the update; wherein, the historical gain drift amount refers to the gain drift amount obtained by iteration at historical time points;
[0134] The fusion formula is G(t) = η·a(t) + (1-η)·G(t-1); where η is the update rate, a(t) is the gain drift update amount for the current frame, G(t-1) is the historical gain drift amount, and G(t) is the current gain drift amount. For example, the update rate ranges from 0.05 to 0.30, and can be 0.15. This value is determined through a grid search of multiple long-term sequences. When the value is below 0.05, the drift tracking lags behind the rate of change of the focal plane temperature, and the correction residual accumulates over time. When the value is above 0.30, single-frame noise directly enters the drift state, and the corrected image exhibits perceptible inter-frame flicker. 0.15 achieves a balance between tracking speed and parameter stationarity.
[0135] Step D6: The offset drift update amount is weighted and fused with the historical offset drift amount currently stored in the image partition according to a preset update rate to obtain the current offset drift amount of the image partition after the update; wherein, the historical offset drift amount refers to the offset drift amount obtained by iteration at historical time points;
[0136] Bias fusion and gain fusion use the same update rate and the same recursive structure, i.e., B(t) = η·b(t) + (1-η)·B(t-1); where b(t) is the bias drift update amount for the current frame, B(t-1) is the historical bias drift amount, and B(t) is the current bias drift amount. The physical sources of bias drift include the change of detector dark current with temperature and the offset drift of the readout circuit. Its time constant is usually longer than that of gain drift. The implementation using a shared update rate is the simplest, and subsequent quality feedback adjustments can be applied to both types of parameters simultaneously.
[0137] Step D7: Calculate the radial multiplicative distortion parameters based on the current bias drift.
[0138] The multiplicative distortion of radial vignetting is related to the radial position of the pixel, and its change is manifested as a systematic distribution of the gain drift of each partition along the radial direction. The gain drift at the partition level has been updated in the previous step, but partitioning is data-driven, and the partition boundaries change with the scene content. Directly using the partition gain cannot guarantee radial continuity. Therefore, step D7 is further expanded into the following steps.
[0139] Specifically, step D7 includes steps D71 to D73:
[0140] Figure 8 The following is a flowchart illustrating a specific implementation of step D7 in the infrared image non-uniformity correction method provided by the present invention:
[0141] Step D71: Using the center of the current frame infrared image as the origin, calculate the radial distance from the center of each image partition to the origin;
[0142] The partition center is the arithmetic mean of all pixel coordinates within that partition, and the radial distance is the Euclidean distance from the partition center to the image center. To ensure parameter portability across different resolutions, the radial distance is normalized to the length of half the image diagonal, with the normalized value ranging from 0 to 1, where 0 corresponds to the image center and 1 corresponds to the image corner.
[0143] Step D72: Using the radial distance as the independent variable and the current gain drift after each image partition update as the dependent variable, perform a polynomial fitting of a preset order to obtain the radial gain fitting function;
[0144] The fitting function is V(ρ) = v0 + v1·ρ + v2·ρ², where ρ is the normalized radial distance, and v0, v1, and v2 are the coefficients of the polynomial to be fitted. For example, the polynomial order ranges from 1 to 3, and can be 2nd order. The physical model of the vignetting shows that the multiplicative decay changes approximately quadratically along the radial direction, and a 2nd order polynomial can characterize its main form. Higher orders are prone to overfitting when the number of sample points is limited. The fitting uses the least squares method, and the samples involved in the fitting are the radial distance between the centers of each partition and the current gain drift; the number of samples is equal to the number of partitions.
[0145] Step D73: Use the polynomial coefficients of the radial gain fitting function as vignetting coefficients, and update the vignetting coefficients to the radial multiplicative distortion parameters.
[0146] The vignetting coefficients are time-smoothed at the same update rate as the partition drift, avoiding fluctuations in the radial fitting results due to partition division. The vignetting coefficients take continuous values across the entire image, compensating for the step defects of the partition model at partition boundaries, and the corrected image no longer shows partition stitching marks.
[0147] In the embodiments corresponding to steps D71 to D73, the radial distance calculation, polynomial fitting and coefficient smoothing are carried out step by step, transforming the discrete partition gain drift into continuous radial multiplicative distortion parameters. The three levels of the drift state are now completely updated.
[0148] In the embodiments corresponding to steps D1 to D7, sample collection, linear regression and recursive fusion constitute the estimation link of bias and gain drift. Radial polynomial fitting is superimposed on it with a continuous multiplicative distortion model. The three types of parameters together constitute the complete response drift state, providing a parameter basis for image correction.
[0149] Step 105: Perform correction on the current frame infrared image according to the updated response drift state to obtain the corrected image of the current frame, and input the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image.
[0150] The correction is applied in reverse order, sequentially addressing bias, gain, and radial multiplicative distortion. These three types of drift are cascaded in the imaging chain, and the reverse compensation order is the opposite of the forward drift generation order: first, additive bias drift is subtracted, then multiplicative gain drift is reversed, and finally, radial multiplicative distortion is eliminated. The corrected image grayscale approximates the ideal output under calibration and can be directly fed into a pre-trained recognition model.
[0151] Specifically, step 105 includes steps E1 to E4:
[0152] Figure 9The following is a flowchart illustrating a specific implementation of step 105 in the infrared image non-uniformity correction method provided by the present invention:
[0153] Step E1: For each pixel in the current frame infrared image, subtract the current offset drift of the image partition to which the pixel belongs;
[0154] Execute g1 = g0 - Bk pixel by pixel; where g0 is the original grayscale value, Bk is the current offset drift of the partition k to which the pixel belongs, and g1 is the intermediate grayscale value after subtraction. Offset subtraction is performed in the integer field, using rounding and clamping to the valid grayscale range to prevent underflow.
[0155] Step E2: Perform inverse gain compensation on the grayscale value of the pixel according to the current gain drift of the image partition to which the pixel belongs;
[0156] Gain inverse compensation is performed according to g2 = g1 / (1 + Gk); where Gk is the current gain drift of partition k, and g2 is the intermediate grayscale value after compensation. Since the typical amplitude of Gk is within ±5%, the denominator is always positive, and the compensation process is numerically stable. Division can be pre-calculated as the reciprocal of each partition and converted into multiplication. Only a few divisions equivalent to the number of partitions are needed per frame; the rest are multiplication-addition operations.
[0157] Step E3: Perform multiplicative inverse compensation on the gray value of the pixel according to the radial multiplicative distortion parameter corresponding to the radial distance from the pixel to the image center to obtain the corrected image of the current frame;
[0158] Multiplicative inverse compensation is performed according to g3 = g2 / V(ρ); where V(ρ) is the value of the radial gain fitting function at the radial distance of the pixel, and g3 is the corrected gray value. The radial distance of the pixel is independent of its gray value. V(ρ) can be pre-calculated and cached row by row before each frame correction, and the value is retrieved row by row during correction. After the three-level compensation is concatenated, the residual non-uniformity of the corrected image mainly comes from the estimated noise and no longer contains systematic drift components.
[0159] Step E4: Input the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image.
[0160] The recognition model is a convolutional neural network trained on labeled infrared images. For example, it employs a detection network trained on a general object detection framework. The input is a single-channel calibrated infrared image, and the output is the category and location of the target in the image. During the training phase, the images used by the recognition model are all from the calibrated image stream. The input distribution during the inference phase remains consistent with the training distribution, avoiding the impact of distribution shift caused by drift on recognition accuracy. The recognition results can be used for downstream tasks such as monitoring alerts and target tracking.
[0161] In the embodiments corresponding to steps E1 to E4, the three-level reverse compensation eliminates various non-uniformities in reverse order of the physical generation of the drift. The corrected image is then fed into the pre-trained recognition model to complete the end-to-end recognition output. The correction and recognition form a closely connected processing loop.
[0162] Step 106: After step 105, evaluate the correction quality of the corrected image and adaptively adjust the update rate based on the evaluation results;
[0163] A fixed update rate cannot simultaneously adapt to both gradual and abrupt drift scenarios. Rapid changes in focal plane temperature require a faster tracking speed, while stable operation necessitates a smaller update rate to suppress parameter jitter. This step uses the inter-frame residual of the corrected image as a measure of correction quality and adjusts the update rate using a closed-loop feedback mechanism to ensure that the drift tracking speed always matches the actual drift rate.
[0164] Specifically, step 106 includes steps F1 to F5:
[0165] Figure 10 The following is a flowchart illustrating a specific implementation of step 106 in the infrared image non-uniformity correction method provided by the present invention:
[0166] Step F1: Perform inter-frame registration on the current frame corrected image and the previous frame corrected image, and then subtract them pixel by pixel to obtain the inter-frame residual image; wherein, the previous frame corrected image is the image cached after the previous frame infrared image has been corrected;
[0167] The generation method for the inter-frame residual image is the same as in step 101, except that the input is changed from the original infrared image to the corrected image. If the correction is sufficient, scene motion is eliminated by registration, drift is compensated by parameters, and the inter-frame residual only contains temporal noise, the magnitude of which can be directly used as a measure of the correction quality. If the correction is insufficient, residual drift persists in the inter-frame residual, and its amplitude is significantly higher than the noise level. The corrected image of the previous frame is provided by the cache, and the cache is updated after each frame is processed.
[0168] Step F2: Calculate the mean of the absolute values of the residuals of the pixels that fall into the effective observation area in the inter-frame residual image, and use this mean as the correction quality index;
[0169] The index calculation is performed only within the effective observation area to avoid contaminating the index in areas where scene motion is not registered. The index is measured in gray levels. For example, the lower and upper limits of the index interval are selected within the range of 1.5 to 3.0 and 4 to 8 gray levels, respectively. The lower limit can be 2 gray levels, and the upper limit can be 6 gray levels. This interval is determined based on the statistical characteristics of temporal noise. The theoretical noise residual mean is approximately 2 gray levels. The lower limit is slightly higher than the noise floor, and the upper limit corresponds to the threshold at which drift becomes perceptible.
[0170] Step F3: When the correction quality index is higher than the upper limit of the preset index range, the update rate is increased by a preset ratio;
[0171] If the metric is higher than the upper limit, it indicates that residual drift is still accumulating and the current tracking speed is insufficient. For example, the preset ratio is set to a value between 5% and 20%, and can be 10%. The update rate is increased by this ratio and then clamped to the upper limit of 0.30 to prevent the parameter oscillation caused by an excessively large update rate.
[0172] Step F4: When the correction quality index is lower than the lower limit of the preset index range, the update rate is reduced by the preset ratio;
[0173] If the index is below the lower limit, it indicates that the inter-frame residual is dominated by noise. Continuing to maintain a high update rate will allow noise to seep into the drift parameters. The update rate is reduced by the same preset ratio and clamped to the lower limit of 0.05. The drift state then enters a stable holding mode, and the parameter jitter converges accordingly.
[0174] Step F5: When the corrected quality index is within the preset index range, the update rate remains unchanged.
[0175] If the index is within the range, it indicates that the tracking speed matches the actual drift rate, and the update rate remains at the current value. The three branches cover all possible values of the index, and the adjusted update rate takes effect in steps D5 and D6 of the next frame, forming a complete closed-loop control loop.
[0176] In the embodiments corresponding to steps F1 to F5, the inter-frame residual measurement, interval decision and proportional adjustment constitute a negative feedback control loop. The update rate is dynamically matched with the drift rate. The system automatically switches between two operating conditions: rapid drift and stable operation, without manual intervention.
[0177] For example, the values of the main parameters in this embodiment are shown in Table 1:
[0178] Table 1 Examples of Main Parameter Values
[0179] parameter Range of values Recommended value Image sub-block size 8×8 to 32×32 pixels 16×16 pixels Preset first threshold 1.0 to 3.0 pixels 1.5 pixels Preset second threshold 5 to 15 gray levels 8 gray levels Preset third threshold 0.6 to 0.8 0.7 Preset fourth threshold 0.75 to 0.90 0.85 Preset frame rate Frames 16 to 48 32 frames Update rate 0.05 to 0.30 0.15 polynomial order Levels 1 to 3 2nd order Preset ratio 5% to 20% 10% Lower limit of indicator range 1.5 to 3.0 gray levels 2 gray levels Upper limit of indicator range 4 to 8 gray levels 6 gray levels
[0180] To verify the technical effectiveness of this embodiment, a comparative experiment was conducted on a long-wave infrared real-world sequence comprising three segments totaling approximately 9000 frames. The scenarios covered nighttime road vehicle monitoring, maritime vessel observation, and field personnel search. The infrared imaging system operated continuously for four hours to accumulate natural drift. The experiment compared three methods: ① a two-point correction method, using only factory calibration parameters for correction; ② a temporal high-pass filtering method, applying a high-pass filter to the historical pixel mean with a fixed time constant to track bias drift; and ③ the residual regression partitioning correction method of this embodiment. Evaluation metrics included spatial non-uniformity (NU), the mean inter-frame residual within the effective observation area, and target recognition accuracy. Recognition accuracy was statistically obtained from the detection results of the same pre-trained recognition model on the outputs of the three methods.
[0181] For example, the performance comparison of the three methods is shown in Table 2:
[0182] Table 2 Performance Comparison of Different Correction Methods
[0183] method Spatial non-uniformity NU Mean of inter-frame residuals Recognition accuracy Two-point correction method 2.8% 6.4 Gray levels 86.5% Time-domain high-pass filtering method 2.1% 4.9 gray levels 89.2% Method of this embodiment 0.9% 2.3 Gray levels 96.1%
[0184] The experimental results show that, compared with the two-point correction method, the spatial non-uniformity of the method in this embodiment is reduced from 2.8% to 0.9%, and the mean inter-frame residual value is reduced from 6.4 gray levels to 2.3 gray levels, approaching the low level of temporal noise, resulting in a 9.6 percentage point improvement in recognition accuracy. Compared with the temporal high-pass filtering method, the spatial non-uniformity is further reduced by 1.2 percentage points, and the recognition accuracy is improved by 6.9 percentage points. The two-point correction method cannot cover the response drift during operation, and the temporal high-pass filtering method only tracks the bias while ignoring gain and vignetting changes. This embodiment, through partition-level gain-bias joint regression and radial multiplicative distortion compensation, suppresses the residual non-uniformity under long-term continuous operation to near the noise level, eliminates the offset of the input distribution of the recognition model, and restores the recognition accuracy to the initial calibration level.
[0185] In the embodiments corresponding to steps 101 to 105, three core non-uniformity problems—pixel bias drift, gain drift, and optical radial vignetting multiplicative distortion—are simultaneously addressed. This overcomes the limitation of traditional correction techniques that can only correct single types of noise, covering various typical non-uniform distortions generated during the operation of infrared imaging systems. It completely eliminates imaging defects such as fixed pattern noise, radial brightness unevenness, and inconsistent pixel response, significantly improving the overall uniformity, clarity, and detail reproduction of infrared images, thereby fundamentally improving the imaging quality of infrared images. Abandoning the traditional globally unified parameter update mode, this method combines image partitioning characteristics and an effective observation area screening mechanism to eliminate interference factors such as invalid areas, scene abrupt changes, and stray noise. It relies solely on effective image data to complete the iterative update of correction parameters, effectively avoiding common problems such as ghosting, over-correction, and correction lag. This allows the correction parameters to dynamically and adaptively adjust to the real-time distortion state of different image regions, adapting to complex and ever-changing imaging scenarios, and significantly improving correction robustness. This invention, based on high-precision non-uniformity correction of images, directly inputs the optimized high-quality images into the pre-trained recognition model, avoiding the recognition deviation problems caused by feature distortion and lack of details in traditional correction images. This makes the image features input into the recognition model more realistic, complete, and standardized, highly matching the model training feature distribution, effectively improving the accuracy, precision, and stability of infrared target recognition, and adapting to various high-precision infrared intelligent recognition scenarios.
[0186] like Figure 2 This invention provides an infrared image correction device; please refer to [link / reference]. Figure 2 , Figure 2 A schematic diagram of an infrared image correction device provided by the present invention is shown, as follows: Figure 2 An infrared image correction device is shown, comprising:
[0187] Registration unit 21 is used to perform inter-frame registration between the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system. The registered previous frame infrared image and the registered current frame infrared image are subtracted pixel by pixel in the same coordinate system to obtain the current registration residual image.
[0188] The selection unit 22 is used to select an effective observation region from the current registration residual image; wherein, the effective observation region refers to a region that meets the corresponding preset conditions;
[0189] Extraction unit 23 is used to extract image partitions in the current registration residual image based on historical registration residual images;
[0190] The update unit 24 is used to update the response drift state of each image partition based on the registration residual within the effective observation area; wherein the response drift state includes the bias drift of each image partition, the gain drift of each image partition, and the radial multiplicative distortion parameter characterizing the radial vignetting multiplicative distortion.
[0191] The correction unit 25 is used to perform correction on the current frame infrared image according to the updated response drift state, to obtain the current frame corrected image, and input the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image.
[0192] This invention provides an infrared image correction device that simultaneously adapts to three core non-uniformity issues: pixel bias drift, gain drift, and optical radial vignetting multiplicative distortion. It overcomes the limitations of traditional correction techniques that can only correct single types of noise, covering various typical non-uniform distortions generated during the operation of infrared imaging systems. It completely eliminates imaging defects such as fixed pattern noise, radial brightness unevenness, and inconsistent pixel response, significantly improving the overall uniformity, clarity, and detail reproduction of infrared images, thus fundamentally improving the imaging quality of infrared images. Abandoning the traditional globally unified parameter update mode, it combines image partitioning characteristics and an effective observation area screening mechanism to eliminate interference factors such as invalid areas, scene abrupt changes, and stray noise. It relies solely on effective image data to iteratively update correction parameters, effectively avoiding common problems such as ghosting, over-correction, and correction lag. This allows the correction parameters to dynamically and adaptively adjust to the real-time distortion state of different image regions, adapting to complex and ever-changing imaging scenarios, and significantly improving correction robustness. This invention, based on high-precision non-uniformity correction of images, directly inputs the optimized high-quality images into the pre-trained recognition model, avoiding the recognition deviation problems caused by feature distortion and lack of details in traditional correction images. This makes the image features input into the recognition model more realistic, complete, and standardized, highly matching the model training feature distribution, effectively improving the accuracy, precision, and stability of infrared target recognition, and adapting to various high-precision infrared intelligent recognition scenarios.
[0193] Figure 3 This is a schematic diagram of a terminal device provided in an embodiment of the present invention. Figure 3 As shown, a terminal device 3 in this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as an infrared image correction program. When the processor 30 executes the computer program 32, it implements the steps in the various embodiments of the infrared image correction method described above, for example... Figure 1 Steps 101 to 105 are shown. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each unit in the above-described device embodiments, for example... Figure 2 The function of the unit shown.
[0194] For example, the computer program 32 can be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to complete the present invention. The one or more units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 32 in the terminal device 3. For example, the specific functions of each unit of the computer program 32 can be divided as follows:
[0195] The registration unit is used to perform inter-frame registration between the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system. The registered previous frame infrared image and the registered current frame infrared image are subtracted pixel by pixel in the same coordinate system to obtain the current registration residual image.
[0196] The selection unit is used to select an effective observation region from the current registration residual image; wherein, the effective observation region refers to a region that meets the corresponding preset conditions;
[0197] The extraction unit is used to extract image partitions from the current registration residual image based on the historical registration residual image;
[0198] The update unit is used to update the response drift state of each image partition based on the registration residual within the effective observation area; wherein the response drift state includes the bias drift of each image partition, the gain drift of each image partition, and the radial multiplicative distortion parameter characterizing the radial vignetting multiplicative distortion.
[0199] The correction unit is used to perform correction on the current frame infrared image according to the updated response drift state, to obtain the corrected image of the current frame, and input the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image.
[0200] The terminal device includes, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of a terminal device 3 and does not constitute a limitation on a terminal device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.
[0201] The processor 30 can be a Central Processing Unit (CPU), or other general-purpose processors, 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, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0202] The memory 31 can be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. The memory 31 can also be an external storage device of the terminal device 3, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device 3. Furthermore, the memory 31 can include both internal and external storage units of the terminal device 3. The memory 31 is used to store the computer program and other programs and data required by the roaming control device. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0203] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0204] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.
[0205] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this invention. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0206] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0207] This invention provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.
[0208] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0209] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0210] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0211] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0212] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units.
[0213] It should be understood that, when used in this specification and the appended claims, terms include indicating the presence of the described feature, integral, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0214] It should also be understood that the terms used in this specification and the appended claims refer to any combination of one or more of the associated listed items and all possible combinations, and include such combinations.
[0215] As used in this specification and the appended claims, the term "if" can be interpreted, depending on the context, as when, once, or in response to determination or in response to detection. Similarly, the phrase "if determined" or "if detected [the described condition or event]" can be interpreted, depending on the context, as once determined or in response to determination or detection [the described condition or event] or in response to detection [the described condition or event].
[0216] Furthermore, in the description of this invention and the appended claims, the terms first, second, third, etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0217] References to one or more embodiments described in this specification mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the invention. Therefore, phrases appearing in different parts of this specification as referring to one embodiment, some embodiments, some other embodiments, and others do not necessarily refer to the same embodiment, but rather mean one or more, but not all, embodiments, unless otherwise specifically emphasized. The terms include, encompass, have, and variations thereof mean including, but are not limited to, unless otherwise specifically emphasized.
[0218] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for correcting non-uniformity in infrared images, characterized in that, The method for infrared image non-uniformity correction includes: Inter-frame registration is performed between the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system. The registered previous frame infrared image and the registered current frame infrared image are subtracted pixel by pixel in the same coordinate system to obtain the current registration residual image. Select an effective observation region from the current registration residual image; wherein, the effective observation region refers to a region that meets the corresponding preset conditions; Based on historical registration residual images, extract image partitions from the current registration residual image; The response drift state of each image partition is updated based on the registration residual within the effective observation area; wherein, the response drift state includes the bias drift of each image partition, the gain drift of each image partition, and the radial multiplicative distortion parameter characterizing radial vignetting multiplicative distortion. The current frame infrared image is corrected according to the updated response drift state to obtain the corrected image of the current frame. The corrected image is then input into a pre-trained recognition model to obtain the recognition result of the infrared image.
2. The method for infrared image non-uniformity correction according to claim 1, characterized in that, The step of selecting an effective observation region from the current registration residual image includes: The current frame infrared image is divided into multiple image sub-blocks of the same size; For each image sub-block, search for the matching sub-block with the most similar grayscale distribution in the previous frame of infrared image, and use the positional offset between the image sub-block and its matching sub-block as the local motion vector of the image sub-block. Image sub-blocks whose magnitude of the local motion vector is greater than a preset first threshold are marked as motion sub-blocks; Calculate the mean magnitude of the pixel grayscale gradient within each of the motion sub-blocks, and mark the motion sub-blocks whose mean magnitude is greater than a preset second threshold as texture sub-blocks; The regions containing all the texture sub-blocks are merged into the effective observation region.
3. The method for infrared image non-uniformity correction according to claim 2, characterized in that, The step of merging the regions containing all the texture sub-blocks as the effective observation region includes: The initial region is obtained by merging the regions containing all the texture sub-blocks. Acquire historical frame infrared images for a consecutive preset number of frames; The residual values of the same pixel in the historical frame infrared image and the current frame infrared image are arranged in chronological order to obtain the residual time series of each pixel; For each pixel, the proportion of residuals in the residual time series of that pixel that maintain a consistent sign is calculated, and this proportion is taken as the sign consistency rate of that pixel. Pixels in the initial region whose symbol consistency rate is greater than a preset third threshold are marked as drift evidence pixels, and pixels in the initial region that are not marked as drift evidence pixels are removed from the initial region to obtain the effective observation region.
4. The method for infrared image non-uniformity correction according to claim 1, characterized in that, The step of extracting image partitions from the current registration residual image based on the historical registration residual image includes: Obtain historical registration residual images for a consecutive preset number of frames, wherein the historical registration residual images are registration residual images cached and saved during the previously performed inter-frame registration process; The residual values of the same pixel in each of the historical registration residual images are arranged in chronological order according to pixel position to obtain the residual time series of each pixel; Calculate the correlation coefficient between the residual time series of any two pixels; Two pixels whose correlation coefficient is greater than a preset fourth threshold are assigned to the same candidate pixel set, and multiple candidate pixel sets are used as image partitions of the current registration residual image.
5. The method for infrared image non-uniformity correction according to claim 1, characterized in that, The step of updating the response drift state of each image partition based on the registration residual within the effective observation area includes: For each image partition, the registration residual values of each pixel within that image partition that falls into the effective observation area are collected; Collect the grayscale values of pixels at the same positions as each of the aforementioned pixels in the current frame infrared image; Using the gray value of each pixel as the independent variable and the registration residual value of that pixel as the dependent variable, linear regression is performed on the data of all pixels in the image partition to obtain the regression slope and regression intercept. The regression slope is used as the gain drift update amount for the image partition, and the regression intercept is used as the bias drift update amount for the image partition. The gain drift update amount is weighted and fused with the historical gain drift amount currently stored in the image partition according to a preset update rate to obtain the current gain drift amount of the image partition after the update; wherein, the historical gain drift amount refers to the gain drift amount obtained by iteratively at historical time points; The offset drift update amount is weighted and fused with the historical offset drift amount currently stored in the image partition according to a preset update rate to obtain the current offset drift amount of the image partition after the update; wherein, the historical offset drift amount refers to the offset drift amount obtained by iteration at historical time points; Calculate the radial multiplicative distortion parameters based on the current bias drift.
6. The method for infrared image non-uniformity correction according to claim 5, characterized in that, The step of calculating the radial multiplicative distortion parameter based on the current bias drift includes: Using the center of the current frame infrared image as the origin, calculate the radial distance from the center of each image partition to the origin; Using the radial distance as the independent variable and the current gain drift after each image partition update as the dependent variable, a polynomial fitting of a preset order is performed to obtain the radial gain fitting function. The polynomial coefficients of the radial gain fitting function are used as vignetting coefficients, and the vignetting coefficients are updated to the radial multiplicative distortion parameters.
7. The method for infrared image non-uniformity correction according to claim 1, characterized in that, The steps of correcting the current frame infrared image based on the updated response drift state to obtain the corrected image of the current frame, and inputting the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image include: For each pixel in the current frame infrared image, subtract the current offset drift of the image partition to which the pixel belongs; The grayscale value of the pixel is compensated in reverse according to the current gain drift of the image partition to which the pixel belongs; The grayscale value of the pixel is multiplicatively inversely compensated according to the radial multiplicative distortion parameter corresponding to the radial distance from the pixel to the center of the image, so as to obtain the corrected image of the current frame; The corrected image is input into a pre-trained recognition model to obtain the recognition result of the infrared image.
8. The method for infrared image non-uniformity correction according to claim 1, characterized in that, Following the steps described above, the following is also included: After performing inter-frame registration on the current frame corrected image and the previous frame corrected image, the images are subtracted pixel by pixel to obtain the inter-frame residual image; wherein, the previous frame corrected image is an image cached after the previous frame infrared image has been corrected; Calculate the mean absolute value of the residuals of the pixels in the inter-frame residual image that fall into the effective observation area, and use this mean value as the correction quality index; When the correction quality index is higher than the upper limit of the preset index range, the update rate is increased by a preset ratio; wherein, the update rate is used to control the fusion ratio of the update amount and the existing state value during the response drift state update process of the next frame of infrared image; When the correction quality index is lower than the lower limit of the preset index range, the update rate will be reduced by the preset ratio; When the correction quality index is within the preset index range, the update rate remains unchanged.
9. An infrared image correction device, characterized in that, The infrared image correction device includes: The registration unit is used to perform inter-frame registration between the previous frame infrared image and the current frame infrared image continuously output by the infrared imaging system. The registered previous frame infrared image and the registered current frame infrared image are subtracted pixel by pixel in the same coordinate system to obtain the current registration residual image. The selection unit is used to select an effective observation region from the current registration residual image; wherein, the effective observation region refers to a region that meets the corresponding preset conditions; The extraction unit is used to extract image partitions from the current registration residual image based on the historical registration residual image; The update unit is used to update the response drift state of each image partition based on the registration residual within the effective observation area; wherein the response drift state includes the bias drift of each image partition, the gain drift of each image partition, and the radial multiplicative distortion parameter characterizing the radial vignetting multiplicative distortion. The correction unit is used to perform correction on the current frame infrared image according to the updated response drift state, to obtain the corrected image of the current frame, and input the corrected image into the pre-trained recognition model to obtain the recognition result of the infrared image.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps in the infrared image correction method as described in any one of claims 1 to 8.
