Infrared stripe correction algorithm based on wavelet decomposition and total variation-guided filtering

Stripe non-uniformity severely affects the quality of infrared images. It is challenging to remove stripe noise in low-texture images without blurring the details. We propose a single-frame image stripe correction algorithm that removes infrared noise while preserving image details. Firstly, wavelet transform is used for multi-scale analysis of the image. At the same time, Total variation model is used for small window to smooth the original image. The small-scale total variation model can well preserve the edge information of the image, but it will leave stripe noise. Therefore, according to the prior knowledge of the vertical component of the stripe noise, the spatial filtering is finally performed: the smoothed image is used as the guide image for the stripe noise denoising. It is possible to prevent the lead filter from mistaking the strong stripe noise as edge detail, resulting in corrected image residual streak noise. The algorithm is systematically evaluated by experiments on simulated images and original infrared images, as well as compared with the current advanced infrared stripe non-uniformity correction algorithms. It is proved that our algorithm can better eliminate stripe noise and preserve edge details.


Introduction
Infrared imaging technology has a wide range of applications in the industrial, military, and medical fields. Within infrared technology, the so-called infrared focal plane array (IRFPA) constitutes the core of infrared imaging systems, and possesses advantageous characteristics such as small size, low production cost, and high sensitivity [1]. IRFPA typically consist of a detector array and readout circuitry. However, owing to component mismatch and changes in parameters during the manufacturing process, the pixel spatial response and the bias voltage of the readout circuitry are different. The resulting infrared images suffer from severe spatial domain fixed pattern noise (FPN) that reduces their quality [2,3]. Stripe non-uniformity is a special FPN caused by the non-uniformity of the amplifier in the readout circuitry.
In the field of image vision, a large number of nonuniformity corrected (NUC) algorithms have been proposed, but the NUC algorithm that preserves the edge details of the image while removing stripe noise is still a problem. The key problem is mainly to separate the stripe noise and high-frequency components, which is difficult due to the mixing and overlapping between there. The bilateral filter distinguishes edges and noise by setting thresholds to achieve edge retention [4][5][6]. However, it adapts to infrared images whose edges are more prominent than noise, and is not suitable for images with low texture and strong noise [7,8]. Cao et al. put forward the wavelet stripe correction algorithm, which decomposes the image in three levels of size and filters at each level of size. The algorithm is complex, and the effect of stripe noise is not ideal [1].. Qian [9] proposed the minimum mean square error striping method to extract the parameter information in the image for correction, which solves the convergence problem of the algorithm well and has a good destriping effect, but there is the problem of losing the details of the image edge. The method proposed in literature [10,11] uses the prior knowledge of the structure of the readout circuit to group the pixels, and applies the correction model to normalize the pixels so that the pixels of the same group have similar outputs. However, the de-striping effect of the algorithm is not good, and the image residual has large stripe noise. Tendero et al. [12,13] proposed an midway histogram equalization algorithm, which can effectively remove stripe noise, but there will be problems of missing image details, resulting in image blur. Moreover, the algorithm involves inverse histogram computations, so the computational complexity is not suitable for real-time processing of images.
The purpose of our research is to propose a singleframe image processing algorithm, which can achieve stripe non-uniformity correction from the first frame without losing the edge information. The proposed algorithm mainly consists of three parts. Firstly, the image processing algorithm based on wavelet decomposition extracts the high-frequency components of the image, and decomposes the high-frequency components into vertical components, horizontal components and diagonal components. At the same time, the original image is smoothed by small-scale using the total variation algorithm. The small scale total variation algorithm can keep the edge information of the image well, but it will leave stripe noise. Since stripe noise is caused by the fact that each column of infrared detector readout circuit shares the same amplifier, and the non-uniformity between amplifiers leads to the formation of fixed stripe noise in the image, according to prior knowledge, stripe noise mainly exists in the vertical component [1]. In the spatial filtering step: the vertical component is taken as an input image, and the smoothed image is used as a guide image for stripe noise denoising. It can prevent the strong stripe noise from being mistaken for the edge detail by the guided filter and lead to the residual stripe noise in the corrected image. The proposed algorithm can eliminate the stripe noise directly in the component part and simultaneously retaining image details.
Compared with other excellent NUC algorithms [14][15][16][17], the proposed algorithm has two advantages. First, it does not need to deal with multiple frames of images to cause unnecessary fuzzy problem. Secondly, the proposed algorithm can effectively remove the stripe noise of the image without blurring the details of the image. This paper is organized as follows: In Section 2, the existing NUC algorithm and the mainstream image denoising algorithm is reviewed. In Section 3, a new infrared image stripe correction approach is proposed. Section 4 describes the implementation details of the algorithm. Section 5 presents experimental results. Finally, the conclusion is drawn in section 6.

Related work
This paper reviews recent advances in FPN correction, including traditional NUC methods and specific correction methods for single-frame image stripe nonuniformity.
Traditional NUC algorithms are included within two major categories, namely calibration-based methods [18][19][20] and scene-based methods [21][22][23][24]. Algorithms within the first category are simple. They employ the two-point calibration method as a classic calibration algorithm. A surface source black body is used to provide a reference temperature to calibrate the detector response by measuring two different known radiations. However, this method increases the complexity and power consumption of the infrared imaging system, and cannot achieve real-time correction of the system. The second category encompasses several common strategies such as constant statistical methods, filtering estimation methods, and image registration methods. In general, these scene-based NUC methods perform stripe noise correction of the image by reasonably estimating the model parameters. However, the limitation of this scene algorithm is that it requires multiple frames of images to obtain a stable correction factor, which requires a large amount of hardware resources to be consumed in actual engineering. Furthermore, the scene-based NUC algorithm requires images to have sufficient scene motion. Otherwise, it will cause blurring of the edge of the target object in the image.
In recent years, a large number of single-frame NUC algorithms have been proposed [25][26][27]. It can be divided into methods based on gray statistics [12,13,28], spatial filtering [4][5][6] and constrained optimization [29][30][31]. The first assumes that the histograms between adjacent columns of the infrared image are essentially the same. Therefore, the new histogram for each column can be modified by the associated histogram of the adjacent columns. The second application of spatial filters to smooth the non-uniformity of the fringes usually requires setting thresholds to distinguish edge information and noise to achieve edge retention,the selection of the threshold has a greater impact on the de-striping effect of the algorithm. However, when the texture information of the image is weak, The algorithm may mistakenly delete the structural information as noise or retain the strong stripe noise as texture information, and the correction effect is not ideal. The third is to convert stripe noise into a problem of minimizing the energy function, and the horizontal gradient is as smooth as possible while the vertical gradient should be kept as much as possible. Chang et al. [32] proposed to consider the characteristics of strip noise and the spectral information of remote sensing images at the same time, and use the stripe noise problem as an image decomposition problem naturally. Kuang et al. [33] proposed a deep convolutional neural network (CNN) model to correct the non-uniformity in a single-frame infrared image, which remove stripe noise effect is better.

NUC algorithm based on multi-scale analysis and total variation-guided filtering
The proposed algorithm is mainly composed of three parts: (1) The high frequency components of the original image are extracted, and a wavelet transform is applied to decompose the vertical component containing the stripe noise. (2) The raw infrared image is small-scale gradient equalization by total variation model to eliminate strong noise. (3) The smoothed image is used as the guide image, and the vertical component including the stripe noise is used as an input for denoising before the finally wavelet reconstruction is performed. The complete processing flow is shown in Fig. 1.

Wavelet transform image multi-scale decomposition
Wavelet analysis technology can unfold the image hierarchically according to the wavelet base, and can determine which level to expand to according to the nature of the image and the image processing requirements given in advance, so that not only can the amount of calculation be effectively controlled, but also the image can be satisfied real-time processing requirements [34][35][36] . The wavelet transform separates the original image from different resolution details with different scales [37].. Therefore, this paper uses wavelet decomposition to represent different directions of the image.
The wavelet transform decomposes the original image Y(i) into high-frequency components F(i) and approximate components X(i), and its formula is expressed as: The high frequency component F(i) includes stripe noise N(i) and vertical texture information V(i) [38]. The high-frequency component F(i) is decomposed by wavelet and can be expressed by the formula: where H i the horizontal component, V i the vertical component, and D i the diagonal component. The result of the image after wavelet transform can be clearly observed as shown in Fig. 2. As shown in Fig. 2b, the stripe noise is basically present in the high frequency components of the image, and the high frequency component is further decomposed by wavelet, as shown in Fig. 2c-e, stripe noise exists in the vertical portion of the high frequency component. According to this experimental conclusion, we eliminate the stripe noise in the vertical component. The following sections will give a detailed description.
Total variation small-scale image smoothing [29,31] The idea of using total variation denoising is to transform the image denoising problem into an image functional energy minimization problem. By adjusting the fidelity and regular terms of the total variation model, the image denoising is realized. The total variation model is shown in formula 3: Where k 1 and k 2 represent the balance factor, Since the infrared fringe noise mainly affects the horizontal gradient of the image, u y is replaced by (u − f) y on the basis of the original model. The total variational model suitable for infrared stripe noise is shown in formula 4: The functional energy equation obtained is: The size of the image is a two-dimensional matrix of M × N size, and a stepwise information of the horizontal direction and the vertical direction is expressed by: Formula 6 and formula 7 are substituted into formula 5 to obtain the discrete numerical expression of the stripe-noise removal model with total variation: In formula 4, d x = u x , d y = u y , and the sum is usually equal to 0.01. Through Lagrange multiplier method, auxiliary variables b x and b y are introduced to convert eq. 9 into an unconstrained equation foization.
A and B are the penalty coefficients of the equation, b x is the auxiliary variable in the x-axis direction, and b y is the auxiliary variable in the y-axis direction. In the specific solution, the parameters in the equation are separated, and the contraction operator λ is introduced to solve the auxiliary variables b x and b y .The effect of total variation smoothing in this section is to prevent the leading filter from mistakenly saving the stripe noise with large amplitude as edge structure. However, the total variation smoothing also needs to control the edge information of the image to prevent the guiding filter from deleting the texture information as noise. Figure 3 shows the effect of the equilibrium coefficients k (k 1 and k 2 ) on the experiment when they are chosen to be 0.01, 0.08, and 0.20. It can be seen from the experiment that the larger the balance coefficient, the more serious the edge details of image loss. Therefore, the equilibrium coefficients k 1 and k 2 we selected in the experiment are 0.01. Figure 4 shows the smooth result of selecting λ as 0.001, 0.01, 0.05 and 0.1, respectively. Firstly, λ selects a very small value, the image will leave a lot of stripe noise (as shown in Fig. 4a). When λ selects a relatively large value (λ = 0.05 or 0.1), the image will blur the vertical edge detail of the image (as shown in Fig. 4c and d. Therefore, the experiment selects λ =0.01, the image smoothes the strong stripe noise of the image, and saves the edge detail information of the image.

Guide filtering removes stripe noise
Guided filter was first proposed by He [39] and has been widely used in image denoising and image defogging. The initial image p (input image) is subjected to filtering processing by a guide picture g such that the final output image q is substantially similar to the initial image P, but the texture portion is similar to the guide picture g. The formula defined between the two is as follows [5,39]: where a k and b k are the linear coefficient and bias coefficient in window w k , i and k are pixel indexes, g is the guide picture, w k is the window with radius h, and the constraint equation of a k and b k in window w k can be expressed as: Where ε is the regularization parameter, and is used to make a k converge.
By solving the least squares (squares) method, the minimum deviation between the reference image and the corrected image can be obtained. The coefficients a k and b k are: Where, u k and σ 2 k are the mean and variance of the guidance image g in window w k , p k is the mean of the  input image p in window w k , and |w| is the number of pixels in window w k . It can be seen from the above review that if the parameterization value is normalized, the value of the guided filter window h will determine the output quality of the image, where H represents the height of the raw image. Figure 5 shows the calibration results using different filter values. We set h = 0.1H, h = 0.3H, h = 0.5H, and h = 0.7H, respectively. It is clear from the experimental results that h uses a small window size (h = 0.1H). The corrected image will have residual stripe noise, as shown in Fig. 5b. When h uses a larger value (h = 0.5H or h = 0.7H), as shown in Fig. 5d and the highlighted portion in Fig. 5e, the result is noticeable blurring of image detail. When set to h = 0.3H, the correction effect is better, stripe noise is eliminated and edge detail information is retained,as shown in Fig. 5c In the experiment of this paper, we set h = 0.3H and the regularization parameter ε = 0.2 2 .

Implementation details
In this section, we explain the precautions of the algorithm. First, the considerations of wavelet transform、total variation smoothing and guiding filter are described in detail, and then the implementation process of the whole algorithm is taken as a reference.

Detail description
For M × N size images (M and N are even by default), the original image is decomposed by the db1 wavelet base and the size becomes half of the raw image.. When the original image is subjected to total variation smoothing, in order to avoid the loss of image details, and the contraction operator λ used is 0.01. In the spatial filtering process of the image, the output image of the total variation smoothed is used as the guided image, and the vertical component after wavelet decomposition is used as the input image of the guided filter. We set regularization parameter ε is 0.2 2 [5], and guiding filter window size is selected a small value to avoid blurring edges of the image. In the experiment, We set h = 0.3H.

Procedure
The pseudoalgorithm for our proposed is presented as Algorithm.

Experiment and analysis
We test the algorithm on raw infrared image, and give quantitative comparison, qualitative analysis and parameter discussion. In the experiment, three state-of-the-art stripe removal methods were compared, namely midway histogram equalization (MHE) [13], L-model algorithm [10] and CNN [33]. All parameter variables of these comparison algorithms are set to the default values using the corresponding references. We also add the conventional image filtering method (Guide Filtering Algorithm (GIF) [18] and Gaussian filter) to compare, further illustrate the denoising ability of the algorithm.

Data set
We validated our proposed algorithm using real infrared images from public data sets, as shown in Fig. 6. The data set is available under the Creative Commons Attribution (CC-BY) license [13], and we selected 3 frames of infrared images with streak noise.

Test on raw infrared images
We choose two types of correction algorithms for experimental comparison. One is the filtering algorithm commonly used in image processing (guided filtering with edge structure holding capability [5,39] and commonly used image smoothing filters). The other type is a number of state-of-the-art stripe correction algorithm, including L-model algorithm [10], midway histogram equalization algorithm [13] and CNN [33]. Experiments with real infrared images further illustrate the de-striping performance of the proposed algorithm.

Comparison with common filtering algorithms
We compare the two common smoothing filters with our proposed method. It is applied to the selection of infrared images with weak edge structure information and severe stripe noise [12]. The comparison algorithm includes guided filtering and 1D Gaussian filtering. . In the experiment, the smoothing parameter of the Gaussian filter is set to γ =0.4, we also set filter window of the Gaussian filter is 2. The regularization parameter ε of the guided filtering is set to 0.2 2 and the guided filtering window is set to h = 0.3H. For proposed method, the wavelet basis function of the wavelet transform is set to db1, the contraction factor λ of total variational small window smoothing is set as 0.001, the regularization parameter ε of guided filtering and denoising is also set as 0.2 2 , and the filtering window h = 0.3H. The experimental results are shown in Fig. 7. Gaussian filtering can basically eliminate all the infrared stripe noise, but in essence, Gaussian filtering convolves the entire frame image, and does not distinguish the edge information and the stripe noise, resulting in blurring of the image edge information. Guided filtering has a better destriping effect, but since the guided filtering also denoises the entire frame image, it also causes a small amount of texture information to be lost, and cannot Fig. 6 Three infrared images for experimental testing. a Scene named is suitcase [13]; b Scene named is leaves [13]; c Scene named is people [13]  simultaneously balance the stripe noise and texture information, especially for weakly textured images. A lot of image detail will be lost. The proposed method can effective eliminates stripe noise while preserving edge detail.

Comparison test of stripe non-uniformity correction algorithm
In the specific implementation, we use three sets of scenes and different noise image sequences. We choose three non-uniform stripe correction algorithms to compare with the proposed algorithm, including L-model algorithm [10], midway histogram equalization algorithm (MHE) [13] and CNN [33]. The MHE algorithm by taking the midway histogram process, the smoothing between columns is achieved,complete the process of removing the stripe noise of the infrared image. The Lmodel algorithm uses the prior knowledge of the readout circuit structure to group the pixels and apply the correction model to normalize the pixels so that the same set of pixels have similar outputs. The CNN algorithm introduces the neural network method into the field of infrared image processing to solve the traditional stripe noise problem. The original image and the image after NUC are shown in Fig. 8, 9 and 10. Observing the image, we can find that there are a lot of stripe noise in the original image, and the three correction algorithms can effectively correct the stripe noise. However, the L-model algorithm does not produce satisfactory noise reduction effect. A large number of strips are still visible in their processing results. (as shown in the yellow highlight area). The MHE algorithm removes non-uniform stripe noise better, but the image is too smooth, it still loses a certain amount of image detail. (as indicated by the red arrow). The image corrected by the CNN algorithm has a milder visual effect, but there is also a loss problem for the image weak texture information. The proposed algorithm has better stripe noise effect without introducing troublesome fuzzy problems, and preserves most of the edge structure information of the image.
We calculated the mean cross-track profiles of the original image and the algorithm-corrected image, and explained it by quantitative analysis. The result is shown in Fig. 11.The effect of stripe non-uniformity can be seen as a rapid change between column mean values. Figure 11a is the column mean curve of Fig. 8a. After the L-model algorithm is corrected (Fig.11b), these changes are reduced, However, There are still some small fluctuations from the curve, indicating uncorrected residual non-uniformity. The MHE algorithm (Fig. 11c) substantially eliminates these small fluctuations. However, it can be seen that the curve is too smooth, indicating that changes in image detail are also lost due to excessive smoothness. The algorithm proposed in this paper (Fig. 11e) and the CNN (Fig. 11d) algorithm have similar curves, which smooth the stripe noise while maintaining small mean changes corresponding to the image details. To further prove above findings, we applied image quality metrics, Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) [29], to evaluate the de-striping performance of the algorithm. PSNR can represent the pixel error between the corrected image and the input image, and the higher the PSNR value, the smaller the distortion of the image. The closer the image is to the original image. The formula is defined as: where MSE represents the expected value of the mean square error between the corrected image and the input image. SSIM theory holds that natural image signals are highly structured, that is, there is a strong correlation between pixels, especially the closest pixels in the spatial domain. This correlation implies important information about the structure of objects in the visual scene, The formula is defined as: where E and F represent the image blocks extracted from the corrected image and raw image by sliding window, and σ E , σ F , μ E , μ F , σ EF represent the standard deviation, mean value and cross-correlation of E and F. p 1 and p 2 take constants is to avoid errors where the denominator is zero in the arithmetic division..In the experimental measurement results, The maximum value of SSIM is 1.The closer to 1 the better the effect of maintaining the edge structure information of the corrected image [36]. Table 1 and Table 2 calculate the PSNR value and SSIM value of several methods, which are contains different stripe noise intensities. As can be seen from all experiments, As can be seen from the table, the PSNR value and the SSIM value obtained by the proposed method are the highest., which indicates the de-striping performance of the proposed algorithm.

Time consumption
We calculated the running time of several stripe corrected methods. The experimental environment was Matlab 2017a, Intel Core i7 CPU and 8GB RAM. The statistical results are shown in Table 3. The proposed method requires a minimum of time compared to several other algorithms. As the resolution of the scene increases, the runtime required by the proposed algorithm is substantially stable at a lower level, which means that our algorithm is likely to be applied to hardware circuitry.

Results and discussion
Stripe non-uniformity has its own characteristics, and it can be seen that the significantly different between columns and columns and extend throughout the overall image. There is no noise-like pattern in other features such as shape compared to objects. The stripe noise is basically present in the high-frequency components of the image [36]. This paper performs multi-scale representation of the image and decomposes the vertical component of the image. Therefore, the idea of the algorithm is to process and de-noise the vertical component of the original image, To achieve the destriping effect and preserve the details of the image. .
The general idea of the algorithm can be shown in Fig. 12. The high frequency of the image is shown in Fig. 12b. The stripe noise is concentrated in the high frequency   component. After the algorithm is corrected, the stripe noise is eliminated and the image detail information is retained (as showen in Fig. 12c). We further demonstrate the performance of the proposed algorithm by the edge detection operator of the image. As shown in Fig. 12d, the extracted edge operator has obvious noise, which will greatly affect the subsequent processing of the image. After the correction algorithm of this paper, the edge extracted as shown in Fig. 12e has obvious improvement. Prove the application value of the algorithm.

Conclusion
In this work, an effective method to correct for stripe non-uniformity while preserving edges and image textures is presented. The advantage of the algorithm is that multi-scale representation of the image by wavelet transform, and the edge preserving smoothing of the image by introducing total variational method, which avoids the retention of strong noise as detail information in the processing of the algorithm. It ensures that no image details will be lost in the denoising process. Finally, guided filter is used for denoising, and the experiments show that the algorithm can remove the stripe noise and keep the edge details of the image.