CN118864304B - A method and device for correcting non-uniform noise of infrared images - Google Patents
A method and device for correcting non-uniform noise of infrared images Download PDFInfo
- Publication number
- CN118864304B CN118864304B CN202411349908.3A CN202411349908A CN118864304B CN 118864304 B CN118864304 B CN 118864304B CN 202411349908 A CN202411349908 A CN 202411349908A CN 118864304 B CN118864304 B CN 118864304B
- Authority
- CN
- China
- Prior art keywords
- infrared image
- matrix
- processing
- parameter
- filtering
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10048—Infrared image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20004—Adaptive image processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20132—Image cropping
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The application provides a non-uniformity noise correction method and device for an infrared image, which comprise the steps of obtaining the infrared image, preprocessing the infrared image to obtain a preprocessed infrared image, carrying out target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, wherein the target processing comprises self-adaptive parameter updating processing or parameter non-updating processing, the self-adaptive parameter updating processing comprises one of DESHADING parameter updating processing, deFPN parameter updating processing and DeStrip parameter updating processing, carrying out DeNU parameter updating processing on the processed infrared image based on the frame number of the infrared image to obtain a second infrared image, carrying out sigmaN parameter updating processing on the second infrared image to obtain a third infrared image, and carrying out data reduction on the third infrared image to obtain the infrared image with non-uniformity noise correction, thereby relieving the technical problems of lower accuracy and efficiency of the traditional non-uniformity noise correction method for the infrared image.
Description
Technical Field
The embodiment of the application relates to the technical field of image processing, in particular to a method and a device for correcting non-uniformity noise of an infrared image.
Background
In the infrared imaging field, the infrared detector often causes significant non-uniformity noise problems in the acquired infrared image due to factors such as production process differences, material characteristics, readout circuit design and the like, and the noise is mainly represented by fixed pattern noise, stripe noise (such as vertical streak noise), irregular speckle noise and the like on the image. The non-uniformity noise seriously affects the quality of the infrared image, reduces the definition, contrast and object recognition capability of the image, and especially has more obvious influence under low contrast and complex background.
Conventional infrared image processing methods tend to focus on a single type of noise suppression, such as reducing random noise by simple filtering techniques, but these methods have limited effectiveness in processing non-uniform noise and have low processing accuracy and efficiency.
Disclosure of Invention
The embodiment of the application provides a method and a device for correcting non-uniformity noise of an infrared image, which are used for solving the technical problems of low precision and efficiency of the existing method for correcting the non-uniformity noise of the infrared image.
In a first aspect, an embodiment of the present application provides a method for correcting non-uniformity noise of an infrared image, where the method includes obtaining an infrared image, preprocessing the infrared image to obtain a preprocessed infrared image, where the preprocessing includes format conversion and data amplification, performing target processing on the infrared image based on a frame number of the infrared image to obtain a first infrared image, where the target processing includes adaptive parameter update processing or parameter non-update processing, the adaptive parameter update processing includes one of DESHADING parameter update processing, deFPN parameter update processing and DeStrip parameter update processing, performing DeNU parameter update processing on the first infrared image based on a frame number of the infrared image to obtain a second infrared image, performing sigmaN parameter update processing on the second infrared image to obtain a third infrared image, and performing data reduction on the third infrared image to obtain an infrared image with non-uniformity noise correction.
Further, the target processing is DESHADING parameter updating processing, target processing is carried out on the infrared image based on the frame number of the infrared image to obtain a first infrared image, the target processing comprises the steps of filtering and cutting the infrared image to obtain a target infrared image, calculating point multiplication between the target infrared image and a preprocessing matrix to obtain a first matrix, wherein the preprocessing matrix comprises a RESSHADING matrix and a RESSHADING matrix, the value ranges of the RESSHADING matrix and the RESSHADING matrix are (-2 13, 213), summing the first matrix to obtain a summation result, and updating the adaptive parameter ALPHASHADING and the adaptive parameter ALPHASHSHADING based on the summation result and a preset constant to obtain the first infrared image.
Further, if the target processing is DeFPN parameter updating processing, performing target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, wherein the target processing comprises the steps of respectively performing zero-filling-free edge mean filtering and cutting on the infrared image to obtain a second matrix and a third matrix, wherein the second matrix and the third matrix are the same in size, subtracting the second matrix from the third matrix to obtain a fourth matrix, performing dot multiplication and summation on the fourth matrix and an FP_ DeTrnd matrix to obtain a target constant, wherein the data range of the FP_ DeTrnd matrix is (-2 12, 212), and updating the adaptive parameter FPN based on the target constant to obtain the first infrared image.
Further, if the target processing is DeStrip parameter updating processing, performing target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, wherein the target processing comprises the steps of subtracting a first zero matrix from the infrared image to obtain a fifth matrix, performing wiener filtering on the fifth matrix to obtain a sixth matrix, subtracting the sixth matrix from the infrared image to obtain a seventh matrix, calculating the median value of each row and each column in the seventh matrix, assigning the value of each row and each column to be the corresponding median value to obtain an eighth matrix and a ninth matrix, calculating the sum of the eighth matrix and the ninth matrix to obtain a tenth matrix, calculating the difference between the mean values of the tenth matrix and the tenth matrix to obtain an eleventh matrix, and performing iterative updating on the adaptive parameter Strip based on the eleventh matrix until the number of iterations reaches a first preset number of times to obtain the first infrared image.
Further, performing DeNU parameter updating processing on the first infrared image to obtain a second infrared image, wherein the processing comprises the steps of subtracting an adaptive parameter NU from the processed infrared image to obtain a first calculation result, performing Gaussian filtering on the first calculation result to obtain a first filtering result, subtracting the first filtering result from the processed infrared image to obtain a second calculation result, performing Gaussian filtering on an absolute value of the second calculation result to obtain a second filtering result, performing equidistant sampling on the second filtering result to obtain a first array, determining a static variable corresponding to the sampling array, performing weighted summation on the first infrared image and the second zero matrix to obtain a twelfth matrix, calculating the absolute value of the processed infrared image minus the twelfth matrix, performing weighted summation on the absolute value and the third zero matrix to obtain a thirteenth matrix, performing equidistant sampling on the thirteenth matrix to obtain a second array, performing equal interval sampling on the second array based on the first array and the second array, and performing iterative updating on the second array until the number of the second array reaches the number of times of iteration.
Further, performing sigmaN parameter updating processing on the second infrared image to obtain a third infrared image, wherein the processing comprises the steps of performing Gaussian filtering on the second infrared image to obtain a third filtering result, subtracting the third filtering result from the second infrared image to obtain a third calculating result, performing Gaussian filtering on the absolute value of the third calculating result to obtain a fourth filtering result, subtracting the adaptive parameter sigmaN from the square value of the fourth filtering result to obtain a fourth calculating result, determining a larger value between the fourth calculating result and 0, calculating a point multiplication between the larger value and the third filtering result to obtain a fifth calculating result, calculating a point division between the fifth calculating result and the square value of the fourth filtering result to obtain a fifth calculating result, and assigning the sum of the fifth calculating result and the third filtering result to the second infrared image to obtain the third infrared image.
Further, the method further comprises the steps of counting the median value of the square value of the fourth filtering result, determining a histogram statistical range based on the median value of the square value of the fourth filtering result, determining the abscissa of the highest column in the histogram statistical range, and updating the adaptive parameter sigmaN based on the abscissa.
In a second aspect, the embodiment of the application provides a non-uniformity noise correction device for an infrared image, which comprises an acquisition unit, a first processing unit and a fourth processing unit, wherein the acquisition unit is used for acquiring the infrared image and preprocessing the infrared image to obtain a preprocessed infrared image, the preprocessing comprises format conversion and data amplification, the first processing unit is used for carrying out target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, the target processing comprises self-adaptive parameter updating processing or parameter non-updating processing, the self-adaptive parameter updating processing comprises one of DESHADING parameter updating processing, deFPN parameter updating processing and DeStrip parameter updating processing, the second processing unit is used for carrying out DeNU parameter updating processing on the first infrared image based on the frame number of the infrared image to obtain a second infrared image, the third processing unit is used for carrying out sigmaN parameter updating processing on the second infrared image to obtain a third infrared image, and the fourth processing unit is used for carrying out non-uniformity noise correction on the third infrared image to obtain non-uniformity noise.
In a third aspect, an embodiment of the present application provides a computing device, including a processing component and a storage component, where the storage component stores one or more computer instructions, where the one or more computer instructions are configured to be invoked and executed by the processing component to implement a method as described in the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, where the computer program is executed by a computer to implement a method as described in the first aspect.
In the embodiment of the invention, the inter-frame change of the infrared image is comprehensively considered, and the accurate matching of noise characteristics under different scenes and illumination conditions is realized through the self-adaptive parameter updating processing (such as DESHADING, DEFPN, DESTRIP parameter updating). Further, by combining DeNU parameter updating and sigmaN parameter adjustment, fixed pattern noise and dynamic variation stripe noise in the image can be effectively removed, and the overall brightness and contrast of the image can be optimized while the image details are maintained. Finally, through the data reduction step, the high fidelity and low delay output of the processed image are ensured, the method is suitable for various high-performance infrared imaging application occasions, and meanwhile, the method can adapt to wider image conditions, and the stability, accuracy and efficiency of the correction effect are improved.
These and other aspects of the application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for correcting non-uniformity noise of an infrared image according to an embodiment of the present application;
FIG. 2 is a flowchart of DESHADING parameter update processing according to an embodiment of the present application;
FIG. 3 is a flowchart of DeFPN parameter update processing according to an embodiment of the present application;
FIG. 4 is a flowchart of DeStrip parameter update processing according to an embodiment of the present application;
FIG. 5 is a flowchart of DeNU parameter update processing provided in an embodiment of the present application;
FIG. 6 is a flowchart of sigmaN parameter update processing provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of an apparatus for correcting non-uniformity noise of an infrared image according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a computing device provided by an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Embodiment one:
In accordance with an embodiment of the present invention, there is provided an embodiment of a method of non-uniformity noise correction of an infrared image, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
Fig. 1 is a flowchart of a method for correcting non-uniformity noise of an infrared image according to an embodiment of the present invention, as shown in fig. 1, the method comprising the steps of:
Step S102, acquiring an infrared image, and preprocessing the infrared image to obtain a preprocessed infrared image, wherein the preprocessing comprises format conversion and data amplification;
in the embodiment of the present invention, taking an example that the infrared image is a 14bit unsigned integer, note dr (dynamic range) =14, and the data range is [0, 2 dr ].
First, the infrared image is magnifiedMultiple of (a) whereinAt this time, the range of the data becomesAfter all the modules are processed, the data is reducedThe magnitude of the infrared image which is finally corrected by the non-uniformity noise is consistent with that of the obtained infrared image. Because the magnification is a power of 2, the magnification has been achieved with a left shift, and a right shift is used to achieve the reduction.
Step S104, performing target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, wherein the target processing comprises adaptive parameter updating processing or parameter non-updating processing, and the adaptive parameter updating processing comprises one of DESHADING parameter updating processing, deFPN parameter updating processing and DeStrip parameter updating processing;
step S106, carrying out DeNU parameter updating processing on the first infrared image based on the frame number of the infrared image to obtain a second infrared image;
Step S108, carrying out sigmaN parameter updating processing on the second infrared image to obtain a third infrared image;
step S110, performing data reduction on the third infrared image to obtain an infrared image with non-uniformity noise correction.
In the embodiment of the invention, firstly, judgment is carried out according to the frame number of the infrared image, so that 4 kinds of selection of self-adaptive parameter updating, namely DESHADING parameter updating, deFPN parameter updating, deStrip parameter updating and parameter non-updating are completed.
If the determination result indicates that any two or three of the adaptive parameter updating processes need to be performed, any two or three of the adaptive parameter updating processes may be performed in parallel.
For example, for the adaptive parameter update process, every 12 frames of infrared images are one period, the 2 nd frame is updated DESHADING th parameter, the 3 rd frame is updated DeFPN th parameter, the 5 th frame is updated DeStrip th parameter, and the 5 th, 7 th, 8 th, 9 th, 10 th and 12 th frames are not updated parameters.
DeNU, the parameters are updated, and the corresponding adaptive parameters are judged whether to need to be updated or not according to the counting of the frame number of the infrared image, and the parameters can also be updated in parallel if needed.
For example, the DeNU parameter updates are performed once every 5 frames of infrared image updates are acquired, that is, deNU parameter updates are performed on infrared image frames of frame numbers 1, 6, 11, 16.
SigmaN parameters, and can also be updated in parallel. Through all the above module processes, the non-uniformity noise correction of the infrared image is completed.
In the embodiment of the present invention, if the target processing is DESHADING parameter updating processing, performing target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, including:
filtering and cutting the infrared image to obtain a target infrared image;
Calculating point multiplication between the target infrared image and a preprocessing matrix to obtain a first matrix, wherein the preprocessing matrix comprises a RESSHADING matrix and a RESSHADING matrix, and the value ranges of the RESSHADING matrix and the RESSHADING matrix are (-2 13, 213);
summing the first matrix to obtain a summation result;
and updating the adaptive parameters alphaSh and alphaSh based on the summation result and a preset constant to obtain the first infrared image.
Specifically, DESHADING parameter updating processing block is responsible for updating the adaptive parameters for removing the pot cover noise. The Shift amplification parameters related to DESHADING block are set as nucShift =4, varShift =10, matShift =20, shShift =13, sh4 shift=13.
Two preprocessing matrices and 3 constants need to be initialized in DESHADING parameter updating process, namely RESSHADING matrix and RESSHADING matrix respectively, and preset constants sh_sh, sh_sh4 and sh4_sh4. The original floating point number result of sh_sh is 0.7606804296, sh_sh4 is 0.5223224804, sh4_sh4 is 0.4147914436, and the three variables are amplified uniformlyMultiple times. While the maximum absolute value in matrix RESSHADING is 0.0043669081, the maximum absolute value of matrix RESSHADING4 is 0.0043982514, for the amplification of matrix values, the scheme adopted is that the 6 th bit after decimal point is reserved after amplification, so the proper amplification factor is=1048576, Where the maximum values are 4579 and 4612 respectively, all smaller thanMatrix amplification of RESSHADING and RESSHADING4The data range after doubling is。
Initialization of Shading and Shading matrices. The original data are all decimal, and the numerical ranges of alphaSh x Shading and alphaSh4 x Shading4 are all when the pot cover is correctedIn order to ensure that the int32 data type does not overflow, the maximum is amplifiedMultiple times. Because ALPHASHADING and ALPHASHADING4 calculated in DESHADING are both enlargedSo Shading and Shading4 are at most amplifiedMultiple times. The variable details of DESHADING parameter update processing are shown in table 1:
TABLE 1
The following describes the DESHADING parameter update process in detail with reference to fig. 2.
For example, the infrared image is noted ORG (640 x 512);
Filtering (filter kernel { -1,1 }) the ORG and cropping to obtain a target infrared image resORG (539 x 412);
the target infrared image resORG is dot-multiplied by the pre-processing matrix RESSHADING, RESSHADING (which may also be referred to as a denoising template), and the result is denoted as a first matrix tmpSh (corresponding to m and n in the flowchart, where m and n are the results of dot-multiplying the target infrared image resORG and the pre-processing matrix RESSHADING, RESSHADING, respectively). Because RESSHADING and RESHADING are the values Target infrared image resORG magnificationThe range of the multiplied value isSo the value of the first matrix tmpSh of the dot product is smaller than(Negative number case is greater thanNot listed separately, the following is true), and does not exceed the data range that can be represented by int 32. Then the tmpSh matrices are summed up, denoted shSum, and the matrix size isSo shSum the data range isInt64 may represent in-range. At this time shSum the magnification isTo control the amplification of the result of the subsequent division operation to beThe magnification of shSum needs to be controlled to coincide with the 3 constants (sh_sh, sh_sh4, sh4_sh4) of the preprocessing, so shSum is scaled downFinal magnification of.
Calculate key parameters beta and alpha, which are amplifiedMultiple times, and then rely on them to complete the updating of the adaptive parameters ALPHASHADING and ALPHASHSHADING.
Wherein, beta= (sh_sh m-sh) sh4 n scale/-sh 4 n) scale/-, a;
alpha=(n-beta*sh_sh4)*scale/sh_sh;
alphaShading=(alphaShading*8+ alpha*2)/10;
alphaShShading4=(alphaShading4*8+beta*2)/10;
where scale represents the intensity of the shading process, a scaling factor, which can be adjusted to control the effect of denoising so that the effect of shading can be stronger or weaker.
Specifically, the parameters DESHADING update the variable details are shown in table 2.
TABLE 2
Shading noise removal is to subtract alphaSh x Shading and alphaSh x Shading4 from the matrix data to be processed (NUC), so the reduction is required to be consistent with the reduced magnification. Because NUC, alphaSh and alphaSh4 are all shifted to the left by nucShift bits and Shading and Shading are shifted to the left by ShShift and ShShift bits, the product of alphaSh x Shading and alphaSh4 x Shading is shifted to the right by ShShift and ShShift bits, and the final result is amplifiedMultiple, consistent with NUC.
In the embodiment of the present invention, if the target processing is DeFPN parameter updating processing, performing target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, including:
Respectively carrying out mean value filtering and cutting without zero filling edges on the infrared image to obtain a second matrix and a third matrix, wherein the second matrix and the third matrix have the same size;
subtracting the second matrix from the third matrix to obtain a fourth matrix;
Performing point multiplication and summation on the fourth matrix and the FP_ DeTrnd matrix to obtain a target constant, wherein the data range of the FP_ DeTrnd matrix is (-2 12, 212);
and updating the adaptive parameter FPN based on the target constant to obtain the first infrared image.
In the embodiment of the present invention, deFPN parameter updating processing is responsible for updating the adaptive parameters for removing fixed pattern noise. The shift amplification parameters related to DeFPN number update processing are set as follows nucShift =4, fpShift =11, fpSumShift =4.
The DeFPN parameter update process requires that the matrix and constants be initialized one each in advance. Initialization relies on an auxiliary correction image FP (typically obtained by shooting with an infrared camera) that is normalized and subtracted by the mean value, so the range of values is (-1, 1) with a range of less than 1. Firstly, carrying out average filtering by using a filtering check FP with the size of 201x201, and returning only a calculated filtered data part without zero padding edges to obtain FP_BLUR, wherein the size is 440x 312%=131072<440 x 312 = 137280<) FP was cut and then subtracted by fp_blur to obtain fp_ DeTrnd, so the value range was (-1, 1), and then fp_ DeTrnd was subtracted by its mean value, and the value range was (-2, 2). Matrix summing is performed after fp_ DrTrnd is squared (the squared range becomes (0, 4), and the summed data range isAnd enlargeDoubling and rounding to obtain SumFPTrnd which is smaller than. Simultaneously amplifying the FP_ DeTrnd matrixRounding after doubling yields a spotted fp_ DeTrnd matrix, which is chosen to shift left by 11 bits because the formal process flow of DeFPN involves a matrix dot product operation on fp_ DeTrnd, preventing the result from exceeding the representation range of int 32. The details of the pre-processing variables for the DeFPN parameter update process are shown in table 3.
TABLE 3 Table 3
The above DeFPN parameter update process is described in detail below with reference to fig. 3.
When the infrared image is an ORG matrix, average filtering (the size of a filtering kernel is 201x 201) and cutting (the size after cutting is consistent with the size after average filtering) of the ORG matrix without zero-filling edges are respectively carried out, the center of the matrix is taken as a base point for cutting to obtain a second matrix Y_BLUR and a third matrix Y_ DeTrnd (1), and then Y_ DeTrnd (1) is subtracted with Y_BLUR to update to obtain a fourth matrix Y_ DeTrnd (2). Because the data range of the input matrix ORG is enlargedThe value range of Y_BLUR is alsoAt the same time the range in ORG matrix is less thanSo the value range of Y_BLUR is alsoBecause is extremely smaller thanThe value range of the matrix Y_ DeTrnd (2) obtained by subtraction is also。
The fourth matrix Y_ DeTrnd (2) and the FP_ DeTrnd matrix are subjected to dot multiplication operation and summed to obtain a target constant sum_Y_FP_ DeTrnd. Data range of fp_ DeTrndThe range of values for the Y_ DeTrnd point multiplied by the FP_ DeTrnd result(Not exceeding the range of representation of int 32), the range of values after matrix summation is in extreme cases clearly outside the range of representation of int32, so the sum_y_fp_ DeTrnd variable uses the int64 data type, the maximum of which is smaller than。
Judging whether the current adaptive parameter FPN update belongs to the first update, if so, reducing sum_Y_FP_ DeTrnd/SumFPDeTrndThe magnification is alphaFP timesIf the update is not the first update, the weight addition update is performed based on the previous alphaFP values. The parameters DeFPN are shown in table 4 for updating the variables.
TABLE 4 Table 4
The FPN noise removal of DeFPN parameter update processing is to subtract alphaFP ×fp from the matrix data to be processed (denoted NUC), so it is necessary to keep the reduction consistent with the reduced magnification. Because NUCs and alphaFP are shifted to the left by nucShift bits and FP is shifted to the left by fpShift bits, the alphaFP x FP product result is shifted to the right by fpShift bits, and the final result is amplifiedMultiple, consistent with NUC.
In the embodiment of the present invention, if the target processing is DeStrip parameter updating processing, performing target processing on the infrared image based on the frame number of the infrared image to obtain a first infrared image, including:
subtracting the first zero matrix from the infrared image to obtain a fifth matrix;
wiener filtering is carried out on the fifth matrix to obtain a sixth matrix, and the infrared image is utilized to subtract the sixth matrix to obtain a seventh matrix;
calculating the median value of each row and each column in the seventh matrix, and assigning the numerical values in each row and each column as the corresponding median values to obtain an eighth matrix and a ninth matrix;
Calculating the sum of the eighth matrix and the ninth matrix to obtain a tenth matrix, and calculating the difference between the mean values of the tenth matrix and the tenth matrix to obtain an eleventh matrix;
And based on the eleventh matrix, carrying out iterative updating on the adaptive parameter Strip until the iterative times reach a first preset times, so as to obtain the first infrared image.
In the embodiment of the present invention, deStrip parameter updating processing is responsible for updating the adaptive parameters for removing streak noise. The DeStrip module does not need to additionally amplify the data, and the data after being shifted left by nucShift bits can be obtained. In addition, deStrip modules do not require pretreatment.
The process of DeStrip parameter update processing is described in detail below in conjunction with fig. 4.
When the infrared image is an ORG matrix, the ORG is subtracted from the first zero matrix S2 (1) to obtain a fifth matrix tmp (1), the fifth matrix tmp (1) is subjected to wiener filtering to obtain a sixth matrix tmp (2), and then the ORG is subtracted from the sixth matrix tmp (2) to obtain a seventh matrix tmp (3).
And respectively calculating the median value of each row and each column of the seventh matrix tmp (3), and assigning all the numerical values of the row/column as the median value of the corresponding row/column, so as to obtain an eighth tmp (4) and a ninth matrix S2 (2), updating the two matrixes after adding to obtain a tenth matrix S2 (3), and subtracting the mean value of the S2 (3) to obtain an eleventh matrix S2 (4).
And judging whether 9 wiener filtering is performed currently, and if not, repeating the previous steps, and iterating until 9 wiener filtering is performed cumulatively. After the iteration is completed, the adaptive parameter Strip can be updated, firstly, the threshold processing is carried out on the S2 (1), the range is-std (S2 (1)), and S2 (4) is obtained. And judging whether the self-adaptive parameter Strip is updated for the first time, if so, assigning the S2 (4) to the Strip, and if not, updating the self-adaptive parameter Strip based on the weighted addition of the current self-adaptive parameter Strip and the S2 (4).
The following describes a specific flow of wiener filtering:
And carrying out Gaussian filtering on the input fifth matrix tmp (1) matrix of the wiener filtering to obtain a local_mean matrix, and subtracting the local_mean from the fifth matrix tmp (1) to obtain a residual matrix. It can be known from the algorithm principle that the range of the fifth matrix tmp (1) is But the difference between the maximum and minimum values in tmp does not exceedThe numerical range of the residual is still。
The residual matrix takes absolute value and then assigns to tmp (2), and tmp (2) is subjected to Gaussian filtering to obtain tmp (3), and then tmp (4) is obtained through squaring. From the previous step, the range of tmp (2) values isThus tmp (4) has a value range ofAt this point it is evident that 2×dr+2×nucshift=2×14+2×4=36 >31, which is beyond the range of expression of int32, reduces the range of tmp (3) to before opening operationSo as to ensure that tmp (4) is withinSo that it does not exceed the representation range of int32, tmp (3) is shifted right by (dr+ nucShift-15) bits and then squared.
Calculating a median value of tmp (4), determining a histogram statistical range according to the median value, obtaining a numerical value sigmaN according to a histogram statistical result, subtracting a constant sigmaN from a tmp (4) matrix to obtain a matrix sigmaU (1), performing thresholding operation on sigmaU, obtaining sigmaU2 (2) after performing max (sigmaU 2 (1) and 0) operation, obtaining sigmaU (3) by multiplying sigmaU (2) by residual, obtaining tmp (5) by dividing sigmaU (3) by tmp (4), adding local_mean to tmp (5), and assigning a result of wiener filtering to tmp. It should be noted that sigmaU (2) has the same numerical range as tmp (4)While the numerical range of residual isWe can combine the dot multiplication and dot division operations in a loop so that no additional memory is required to store sigmU (3). Furthermore, there is a very important point because the operation of the dot-removal tmp (4) matrix is involved, and 1 is added to all positions in the tmp (4) matrix in order to avoid 0 s in the matrix. Details of some of the variables in wiener filtering are shown in table 5.
TABLE 5
In the embodiment of the present invention, performing DeNU parameter updating processing on the first infrared image to obtain a second infrared image, including:
Subtracting the self-adaptive parameter NU from the processed infrared image to obtain a first calculation result;
Carrying out Gaussian filtering on the first calculation result to obtain a first filtering result, and subtracting the first filtering result from the processed infrared image to obtain a second calculation result;
Carrying out Gaussian filtering on the absolute value of the second calculation result to obtain a second filtering result;
the second filtering result is sampled at equal intervals to obtain a first array, and a static variable corresponding to the sampling array is determined;
carrying out weighted summation on the first infrared image and the second zero matrix to obtain a twelfth matrix;
calculating the absolute value of the twelfth matrix subtracted from the processed infrared image, and carrying out weighted summation on the absolute value and a third zero matrix to obtain a thirteenth matrix;
sampling the thirteenth matrix at equal intervals to obtain a second group;
And carrying out iterative updating on the self-adaptive parameter NU based on the first array and the second array until the iterative times reach a second preset times, so as to obtain the second infrared image.
In the embodiment of the invention, deNU parameter updating processing is responsible for updating the adaptive parameters for removing the ghost noise. The shift amplification parameter setting involved in DeNU parameter update processing is nuShift =4. Because the magnification of all key variables is consistent, they are not separately labeled.
The pre-processing of DeNU parameter updating processing is simpler, two zero matrixes, namely thetaUT and sigmaUT, are created, and real data are put in a certain multiple, but the initial value is 0, so that the processing is not needed. Furthermore, there is a value that needs to be calculated in advance, i.e. mu, which value depends on the dynamic range of the image data. DeNU pretreatment variables details are shown in table 6.
TABLE 6
All key data magnification factors in DeNU parameter updating processing are. Assume DeNU that the input image of the parameter update processing module is an ORG matrix.
The process of updating DeNU parameters is described in detail below in conjunction with fig. 5.
Subtracting the adaptive parameter NU from the first infrared image ORG to obtain a first calculation result local_m (1), then obtaining a first filtering result local_mean (2) through Gaussian filtering, subtracting the first filtering result local_m (2) from the first infrared image ORG to obtain a second calculation result sigmaU _s (1), taking an absolute value, then carrying out high filtering to obtain a second filtering result sigmaU _s (2), and then sampling 501 data at equal intervals on a sigmaU _s (2) matrix to form a first array S of arrays, and sequencing the S.
The first infrared image ORG and the old second zero matrix theatUT (1) are weighted and summed to obtain a twelfth matrix thetaUT (2), the first infrared image takes absolute value of the result of subtracting the twelfth matrix thetaUT (2) from the ORG and then is weighted and summed with the third zero matrix sigmaUT (1) to obtain a thirteen matrix sigmaUT (2), and then the thirteen matrix sigmaUT (2) matrix is sampled 501 data at equal intervals to form a second group T, and the T is ordered.
Judging whether the flag is greater than 10 (the flag is a static variable and is initially 0), if not, adding 1, and if yes, entering the next step. Based on arrays S and T, rank rnk is calculated, a determination rnk is made as to whether the value is less than the threshold we set, and NU is updated if so. The specific formula for updating NU is as follows: so that the magnification of NU is consistent with mu, calculate that mu's original data is amplified Multiple of mu is amplified again in DeNUDeNU parameter update processMagnification of the final NU is。
In the embodiment of the present invention, performing sigmaN parameter updating processing on the second infrared image to obtain a third infrared image, including:
Performing Gaussian filtering on the second infrared image to obtain a third filtering result, and subtracting the third filtering result from the second infrared image to obtain a third calculation result;
Carrying out Gaussian filtering on the absolute value of the third calculation result to obtain a fourth filtering result;
Subtracting the adaptive parameter sigmaN from the square value of the fourth filtering result to obtain a fourth calculation result, and determining a larger value between the fourth calculation result and 0;
Calculating the dot product between the larger value and the third filtering result to obtain a fifth calculation result;
Calculating a dot division between the square value of the fifth calculation result and the square value of the fourth filtering result to obtain a fifth calculation result;
and assigning the sum of the fifth calculation result and the third filtering result to the second infrared image to obtain the third infrared image.
In the embodiment of the invention, sigmaN parameter updating processing is responsible for updating the self-adaptive parameters for removing random noise, sigmaN parameter updating processing does not need to additionally amplify data, and the data after nucShift bits are shifted left. In addition, deNoise modules do not require pretreatment.
The process of updating sigmaN parameters is described in detail below in conjunction with fig. 5.
When the second infrared image is an ORG matrix, the second infrared image ORG is subjected to gaussian filtering to obtain a third filtering result local_m, the second infrared image ORG is subtracted from the third filtering result local_m to obtain a third calculation result res, the absolute value is taken to obtain sigmaV (1), and then the fourth filtering result sigmaV (2) is obtained through gaussian filtering.
After that, for the fourth filtering result sigmaV (2) square, it should be noted that the value range of the fourth filtering result sigmaV (2) isThe squared value size may exceed the representation range of int32, so the result is temporarily stored as int64, then scaled down to the range represented by int32, i.e. shifted right by (dr+ nucShift) by 2-31 bits, and the final result is stored in the fourth calculation sigmaV (3).
The adaptive parameter sigmaN is subtracted from the result of the fourth calculation result sigmaV (3) to obtain a fourth calculation result sigmaU (1), and the fourth calculation result is compared with 0 in size to obtain a larger value sigmaU (2). Then, the larger value simgaU (2) is multiplied by the third filtering result local_m, and then the fourth calculation result sigmaV (3) is divided by the point to obtain a fifth calculation result, and note that the result of the point multiplication operation may exceed the representation range of int32, so that the intermediate result of the point multiplication is stored by using int64, and the result of the point division may be stored as int32. And finally, a fifth calculation result plus a third filtering result local_m are obtained and assigned to the second infrared image ORG, and a third infrared image can be obtained.
Note that, sigmaN parameters are to be updated, the update frequency is the same as the frequency of the adaptive parameter update process, the median of the square values of the fourth filtering result is counted first, the statistical range of the histogram is determined through the median, and histVal (the abscissa of the highest bin in the statistical result of the histogram) is obtained from the statistical result of the histogram. Finally histVal and old adaptation parameters sigmaN are weighted and summed to update the adaptation parameters sigmaN.
The histogram calculation process is explained below.
In the histogram statistics, the statistics needs to be divided into 100 segments, if the statistics is a floating point number, the statistics can be divided into 100 segments, and the statistics can be normally divided, but the problem that the fixed-point operation needs to face is that the data is extremely poor to be less than 100 in extreme cases, so the statistics cannot be divided into 100 segments. For the extreme cases, the strategy adopted is to judge whether the range (i.e. the statistical range) of the data is smaller than 100, wherein the data is divided into data segments with the same range of sizes if the range is smaller than 100, and the data segments with the same range of sizes are divided by 100 to be rounded upwards if the range is larger than 100 to be the segment length.
Gaussian filtering is an important step in the method of correcting non-uniform noise of an infrared image, and the two filtering processes will be described in detail.
In the embodiment of the invention, most of the gaussian filtering is calculated based on int32, but sometimes, in order to ensure the calculation accuracy, a small part of the gaussian filtering is calculated based on int 64. Since the gaussian filter kernel usually appears in the form of decimal, the key to realizing fixed-point gaussian filter is to amplify the value of the filter kernel and finally reduce the filtering result.
Based on the gaussian filtering of int32, the left Shift number is set to g32shift=12. The numerical representation range of int32 isBecause our data is initialized to a simple post-processing range ofAmplification ofIs after doublingSo that it can be amplified at the mostMultiple times. Because the sum of the Gaussian filter kernels is 1, the Gaussian filter kernels amplify by a plurality of times, and the filtering result amplifies by a corresponding plurality of times, so the Gaussian filter kernels amplify at mostDouble, so there is no data overflow in this scheme.
Gaussian filtering based on int 64. The left Shift number is set to g64 shift=25. The numerical representation range of int32 isThe calculation steps to use based on the type of int64 appear in DeNU. From the introduction of DeNU parameter update processing, it is known that Gaussian filtered object amplificationThe data range of the result of the gaussian filtering before the narrowing should be the multiple,
Whereas dr+ nucShift + nuShift +g64shift=14+4+4+25=47 <63, the data range of int64 is sufficient for storage, but int32 is difficult to qualify. These calculations use a gaussian filter of the int64 type, since experiments have shown that using a gaussian filter of the int32 type in this section can make the fixed point number shortcircuit more error than the floating point number algorithm. So to ensure the accuracy of the algorithm, a small part of the operations are implemented based on the int64 data type.
Embodiment two:
the embodiment of the invention also provides a device for correcting the non-uniformity noise of the infrared image, which is used for executing the method for correcting the non-uniformity noise of the infrared image provided by the embodiment of the invention, and the following is a specific introduction of the device for correcting the non-uniformity noise of the infrared image provided by the embodiment of the invention.
As shown in fig. 2, fig. 2 is a schematic diagram of the above-mentioned non-uniformity noise correction apparatus for an infrared image, the non-uniformity noise correction apparatus for an infrared image comprising:
an acquiring unit 10, configured to acquire an infrared image, and perform preprocessing on the infrared image to obtain a preprocessed infrared image, where the preprocessing includes format conversion and data amplification;
A first processing unit 20, configured to perform a target process on the infrared image based on a frame number of the infrared image, so as to obtain a first infrared image, where the target process includes an adaptive parameter update process or a parameter non-update process, and the adaptive parameter update process includes one of DESHADING parameter update process, deFPN parameter update process, and DeStrip parameter update process;
A second processing unit 30, configured to perform DeNU parameter updating processing on the first infrared image based on the frame number of the infrared image, so as to obtain a second infrared image;
A third processing unit 40, configured to perform sigmaN parameter updating processing on the second infrared image to obtain a third infrared image;
and a fourth processing unit 40, configured to perform data reduction on the third infrared image, so as to obtain an infrared image with non-uniformity noise correction.
In the embodiment of the invention, the inter-frame change of the infrared image is comprehensively considered, and the accurate matching of noise characteristics under different scenes and illumination conditions is realized through the self-adaptive parameter updating processing (such as DESHADING, DEFPN, DESTRIP parameter updating). Further, by combining DeNU parameter updating and sigmaN parameter adjustment, fixed pattern noise and dynamic variation stripe noise in the image can be effectively removed, and the overall brightness and contrast of the image can be optimized while the image details are maintained. Finally, through the data reduction step, the high fidelity and low delay output of the processed image are ensured, the method is suitable for various high-performance infrared imaging application occasions, and meanwhile, the method can adapt to wider image conditions, and the stability, accuracy and efficiency of the correction effect are improved.
Embodiment III:
An embodiment of the present invention further provides a computing device, which may include a storage component 41 and a processing component 42, as shown in fig. 3, for executing the program of the method described in the first embodiment;
The storage component 41 stores one or more computer instructions for execution by the processing component 42.
The processing component 42 may include one or more processors to execute computer instructions to perform all or part of the steps of the method described above in connection with embodiment one. Of course, the processing component may also be implemented as one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described above.
The storage component 41 is configured to store various types of data to support operations at the terminal. The memory component may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The display component 43 may be an Electroluminescent (EL) element, a liquid crystal display or a micro display having a similar structure, or a retina-directly displayable or similar laser scanning type display.
Of course, the computing device may necessarily include other components, such as input/output interfaces, communication components, and the like.
The input/output interface provides an interface between the processing component and a peripheral interface module, which may be an output device, an input device, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by the cloud computing platform, and at this time, the computing device may be a cloud server, and the processing component, the storage component, and the like may be a base server resource rented or purchased from the cloud computing platform.
Embodiment four:
the embodiment of the application also provides a computer storage medium, which stores a computer program, and the computer program can implement the method of the embodiment shown in fig. 1 when executed by a computer.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same, and although the present application has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present application.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411349908.3A CN118864304B (en) | 2024-09-26 | 2024-09-26 | A method and device for correcting non-uniform noise of infrared images |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411349908.3A CN118864304B (en) | 2024-09-26 | 2024-09-26 | A method and device for correcting non-uniform noise of infrared images |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118864304A CN118864304A (en) | 2024-10-29 |
CN118864304B true CN118864304B (en) | 2024-11-29 |
Family
ID=93168235
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411349908.3A Active CN118864304B (en) | 2024-09-26 | 2024-09-26 | A method and device for correcting non-uniform noise of infrared images |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118864304B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968776A (en) * | 2012-11-13 | 2013-03-13 | 华中科技大学 | Linear filter and non-linear filter combined heterogeneity correction method |
CN102968765A (en) * | 2012-11-13 | 2013-03-13 | 华中科技大学 | Method for correcting infrared focal plane heterogeneity based on sigma filter |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104620282B (en) * | 2012-07-16 | 2018-01-12 | 菲力尔系统公司 | For suppressing the method and system of the noise in image |
CN115690433A (en) * | 2022-10-08 | 2023-02-03 | 北京信息科技大学 | Infrared nonuniformity correction method and device based on deep convolutional neural network |
-
2024
- 2024-09-26 CN CN202411349908.3A patent/CN118864304B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968776A (en) * | 2012-11-13 | 2013-03-13 | 华中科技大学 | Linear filter and non-linear filter combined heterogeneity correction method |
CN102968765A (en) * | 2012-11-13 | 2013-03-13 | 华中科技大学 | Method for correcting infrared focal plane heterogeneity based on sigma filter |
Also Published As
Publication number | Publication date |
---|---|
CN118864304A (en) | 2024-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2293239B1 (en) | Line noise reduction apparatus and method | |
EP2579207A2 (en) | Method of noise reduction in digital x-ray frames series | |
WO2013125984A2 (en) | Method for suppressing noise in digital x-rays | |
JP2008146643A (en) | Method of reducing motion blur in motion blurred images, apparatus for reducing motion blur in motion blurred images, and computer embodying a computer program for reducing motion blur in motion blurred images Readable medium | |
WO2017100971A1 (en) | Deblurring method and device for out-of-focus blurred image | |
CN110796624B (en) | Image generation method and device and electronic equipment | |
CN102104730A (en) | Information processing apparatus, information processing method, and program | |
JP2010193199A (en) | Image processor and image processing method | |
CN113344801A (en) | Image enhancement method, system, terminal and storage medium applied to gas metering facility environment | |
CN114862897B (en) | Image background processing method and device and electronic equipment | |
US20090074318A1 (en) | Noise-reduction method and apparatus | |
CN112053302A (en) | Denoising method, device and storage medium for hyperspectral image | |
CN114943649A (en) | Image deblurring method, device and computer readable storage medium | |
Kang et al. | Simultaneous image enhancement and restoration with non-convex total variation | |
CN111383196B (en) | Infrared image stripe eliminating method, infrared detector and storage device | |
CN109360167B (en) | Infrared image correction method, device and storage medium | |
CN118864304B (en) | A method and device for correcting non-uniform noise of infrared images | |
CN114463225B (en) | Bilateral filtering method and device | |
US9715720B1 (en) | System and method for reducing image noise | |
CN113438386B (en) | Dynamic and static judgment method and device applied to video processing | |
Jindal et al. | Bio-medical image enhancement based on spatial domain technique | |
CN118154490A (en) | Weak light image enhancement processing method and device, storage medium, and terminal | |
CN114372938B (en) | A calibration-based adaptive image restoration method | |
CN115760578A (en) | Image processing method and device, electronic equipment and storage medium | |
KR101619089B1 (en) | noise reduction method in images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |