## 2 High Dynamic Infrared Image Enhancement Algorithm
### Discrete Smooth 2D Wavelet Transforms  
Fourier transform converts the signal analysis into the field of frequency domain analysis. Both the linear system and the nonlinear system can be analysed, which is more convenient when analysing the performance of the system. Using Fourier transform, Formula (1) shows that obtaining a signal to its Fourier transform spectrum must take an infinite amount of time (\(-\infty\), \(+\infty\)); that is, it must be obtained in the time domain of all the information, and vice versa. To use the spectrum to describe the signal, regardless of how short the signal time, the entire frequency domain must be used. That is, the Fourier transform is not localised and is only applicable to deterministic signals and smooth signals. However, most signals are non-smooth signals, and the frequency analysis of the Fourier transform is deficient. \[F(w)=\int_{-\infty}^{\infty}f(t)\times e^{-iwt}dt\Rightarrow WT(a,\tau)=\frac {1}{\sqrt{a}}\int_{-\infty}^{\infty}f(t)\times\psi\bigg{(}\frac{t-\tau}{a} \bigg{)}dt \tag{1}\]  
Wavelet transform is developed on the basis of Fourier transform, which retains the advantages of Fourier transform in frequency-domain processing, but also has a good time-domain processing ability. As can be seen from Equation (1), unlike the Fourier transform, which has only frequency as a variable, the wavelet transform has two variables: scale \(a\) and translation \(\tau\). The scale \(a\) controls the expansion and contraction of the wavelet function, and translation \(\tau\) controls the translation of the wavelet function. Scale \(a\) corresponds to frequency, and translation \(\tau\) corresponds to time. This not only indicates what frequency component the signal has, but also exactly where it exists in the time domain. In 2D digital image processing, given a scale function \(\varphi(x)\) and a wavelet function \(\psi(x)\), a 2D scale function \(\varphi(x,y)=\varphi(x)\varphi(y)\) and three 2D wavelet functions \(\psi^{H}(x,y)=\psi(x)\varphi(y)\), \(\psi^{Y}(x,y)=\varphi(x)\psi(y)\) and \(\psi^{D}(x,y)=\psi(x)\psi(y)\) can be combined. The discrete function \(f(x,y)\) can be decomposed into a linear combination of these four functions at different scales and locations, as shown in Equation (2):  
\[f(x,y)=\frac{1}{\sqrt{MN}}\sum\limits_{m}W_{\varphi}(0,m,n)\varphi_{0,m,n}(x,y )+\frac{1}{\sqrt{MN}}\sum\limits_{j=0}^{\infty}\left\{ \begin{array}{l}\sum \limits_{m}W_{\varphi}^{H}(j,m,n)\psi_{j,m,n}^{H}(x,y)+\\ \sum\limits_{m}w_{\varphi}^{V}(j,m,n)\psi_{j,m,n}^{V}(x,y)+\\ \sum\limits_{m}w_{\varphi}^{D}(j,m,n)\psi_{j,m,n}^{D}(x,y)\end{array} \right\} \tag{2}\]  
where the first part represents the low-frequency coefficients of the high dynamic infrared image, representing the background information of the image, and the second part represents the high-frequency coefficients of the high dynamic infrared image, representing the details of the image as well as the contour information. Through Formula (2), providing a multi-layer decomposition of the image, each decomposition can obtain a low-frequencycomponent and three high-frequency components in the horizontal, vertical and diagonal directions. This decomposition structure is shown in Figure 2.  
In addition, the SWT2 algorithm uses up-sampling when performing wavelet decomposition, interpolating zeros at intervals when performing the layering operation, which ensures that the layered image is still the same size as the original image. Different layers of the image can be merged, and the decomposition process is shown in Figure 3.  
In this study, a three-layer wavelet decomposition process is carried out on the acquired high dynamic image, which contains trees, grass, streetlamps, characters and horses in the near distance. This image has good research value. The experiment is shown in the figure below. After wavelet decomposition, the first layer of low-frequency information is shown in Figure 4a, which is able to maximise the retention of the background information.