# Infrared Stripe Correction Algorithm Based on Wavelet Analysis and Gradient Equalization
## 3 Stripe Correction New Algorithm Based on Wavelet Analysis and Gradient Equalization
### Small Window Column Equalization  
Currently, the readout circuit of an uncooled infrared imaging system mostly adopts the CMOS architecture. Different from the CCD structure in which all pixels share a common amplifier, the pixels in each column of the CMOS readout circuit share an amplifier [27]. As amplifiers have different electronic properties, the columns of the CMOS readout circuit are non-uniform and thus appear as stripes in the image. In infrared image non-uniformity correction algorithms, the response of infrared focal plane pixels is generally approximated by a linear model, as follows:  
\[Y_{n}(i,j)=a_{n}(i,j)X_{n}(i,j)+b_{n}(i,j) \tag{6}\]  
where \(Y_{n}\)(\(i\),\(j\)) is the output of the detector, \(X_{n}\)(\(i\),\(j\)) is the true response value of the detector, \(a_{n}\)(\(i\),\(j\)) and \(b_{n}\)(\(i\),\(j\)) are the gain and bias coefficients, and \(n\) is the number of frames in the image sequence. Considering that the stripe noise in the image is a fixed additive noise, the infrared image model can be simplified as follows:  
\[Y_{n}(i,j)=X_{n}(i,j)+E(j) \tag{7}\]  
where (\(i\),\(j\)) are pixel coordinates, and \(Y_{n}\)(\(i\),\(j\)) represents infrared images containing vertical stripes noise. \(E(j)\) is a one-dimensional vector whose elements correspond to the vertical stripe noise of each column of the image. The effect of stripe noise on the image gradient is mainly concentrated in the horizontal direction, whereas the gradient in the vertical direction is hardly affected. Based on the above theoretical basis, infrared noise can be removed by reducing the horizontal gradient. Figure 4: From left to right (**a**) using db1 wavelet, (**b**) using haar wavelet, (**c**) using sym8 wavelet. Please zoom in to check details. Figure 3: Wavelet decomposition: (**a**) original image, (**b**) vertical component, (**c**) horizontal component, and (**d**) diagonal component. Please zoom in to check details. Assuming that each column of a single infrared image contains sufficient information, and that the image is continuous, the gray value between two adjacent columns does not change significantly, and denoising can be achieved by equalizing the column histogram. Calculate the cumulative histogram \(H_{j}\) of each column pixel \(U_{j}\) of the vertical component, and for the cumulative histogram data \(H(i,j)\) of the entire image \(U\), Formula (8) is used to perform horizontal convolution on the cumulative histogram of the vertical component to achieve column equalization:  
\[W(i,j)\star H(i,j)=\sum_{s=1}^{N}\sum_{t=1}^{N}W(s,t)H(i+s,j+t) \tag{8}\]  
where \(\star\) denotes convolution, and \(N\) is the operation range. A Gaussian kernel function is used to generate the one-dimensional matrix \(W(i,j)\) with size \(1\times(2N+1)\), as follows:  
\[W(i,j)=\frac{1}{2\pi\phi^{2}}\exp(-\frac{(i-N-1)^{2}+(j-N-1)^{2}}{2\phi^{2}}) \tag{9}\]  
The value \(N\) for the window is selected as 1. The value of \(\varphi\) is only related to inherent detector characteristics, and it can be obtained through pre-calibration. In this study, an optimized structure is introduced to add a total variational regular term and adaptively determine the value of \(\varphi\). The formula is as follows:  
\[\varphi^{*}=\text{argmin}\|H_{\varphi}\|_{TV^{*}} \tag{10}\]  
where \(H_{\varphi}\) is the image after correction for a specific value of variance. The total variation of \(\|H_{\varphi}\|_{TV^{*}}\) is defined as follows [22]:  
\[\|H_{\varphi}\|_{TV^{*}}=\sum_{i,j}\left|(\
abla I)_{i,j}\right| \tag{11}\]  
\[(\
abla I)_{i,j}=(I_{i,j+1}-I_{i,j}) \tag{12}\]  
The value of \(\varphi\) can be obtained as follows: First, the \(\varphi\) chooses a smaller value, and then increase the value of \(\varphi\), and constantly observes the quality of the image, when the image quality is the highest, then the value of \(\varphi\) is the detector's variance. When the value of window \(N\) is fixed at 1, as shown in Figure 5, if \(\varphi\) is taken as a small value, there will be a large quantity of stripe noise residuals.