## 3 Background
### Discrete Wavelet Transform (DWT)  
Multi-resolution analysis (MRA) of images is a very recent technique, and it relies on the mathematical framework provided by the relatively new theory of wavelets [59]. The concept is a wavelet- and transform-based image processing method. These are helpful, since they tell us about the frequency and timescale of an image. When a 2D wavelet transform is applied, the resulting representation of the image is a four-component sum across all resolutions. The analysis and representation of images and information at several resolutions are the goals of multi-resolution theory. It draws from a wide variety of disciplines to create a new method. Sub-band encoding is a technique from digital signal processing, and quadrature mirror filtering originates in the field of pyramidal imaging. Multi-resolution analysis is the popular name for a theoretical framework supporting many resolutions (MRA). MRA's main benefit is that it can often identify previously invisible details at lower magnifications. An iterative succession of scaled-down versions of the  
Figure 2: The process of the discrete cosine transform.  
input image is generated mathematically. At each tier, the resolution is multiplied by 2. For an image \(f(x,y)\) of size \(M\times N\), the discrete wavelet transform is calculated as follows:  
\[W_{\varphi}(j_{o},m,n)=\frac{1}{\sqrt{MN}}\sum_{x=0}^{M-1}\sum_{y=0}^{N-1}f(x,y )\varphi_{j_{o},m,n}(x,y) \tag{4}\]  
\[W_{\psi}^{i}(j_{o},m,n)=\frac{1}{\sqrt{MN}}\sum_{x=0}^{M-1}\sum_{y=0}^{N-1}f(x, y)\psi^{i}j_{o},m,n(x,y) \tag{5}\]  
where  
\[\varphi_{j,m,n}(x,y)=2^{\frac{1}{2}}\varphi(2^{i}x-m,2^{i}y-n) \tag{6}\]  
\[\psi_{j,m,n}^{i}(x,y)=2^{\frac{1}{2}}\psi^{i}(2^{i}x-m,2^{i}y-n) \tag{7}\]  
where \(i\) = [Diagonal, Vertical, Horizontal], and \(j_{o}\) is used to denote the scale, which is initially selected arbitrarily. The approximate value of \(f(x,y)\) at scale \(j_{o}\) has approximate coefficient values that are denoted by \(W_{\psi}(j_{o},m,n)\). Coefficients of the form \(W_{\psi}^{i}(j,m,n)\) are appended for scales above \(j_{o}\), allowing for higher diagonal, vertical, and horizontal specificity. If \(m=n=0,1,2,...,2^{j}-1\) and \(j=0,1,2,...,j-1\), then \(N=M=2^{j}\) and \(j_{o}=0\) are chosen. The inverse discrete wavelet transform yields \(f(x,y)\) when given \(W_{\psi}^{i}\) and \(W_{\varphi}\). To illustrate the two-level DFT that is used to decompose the input, Figure 3 shows this process.  
To calculate wavelet components, the Haar wavelet transform is utilized. The Haar transform is used to calculate wavelets, and this transformation is the most basic kind of wavelet. It is the basis for all subsequent refined wavelet types [60]. The mathematical expression for the mother wavelet function \(\psi(a)\) of the Haar wavelet is provided by the following equation:  
\[\psi(a)=\begin{cases}1&0\leq a<\frac{1}{2}\\ -1&\frac{1}{2}\leq a<1\\ 0&\textit{Otherwise}\end{cases}, \tag{8}\]  
The scaling function of the Haar function is denoted by \(\varphi(a)\), which is defined as follows:  
\[\varphi(a)=\begin{cases}1&0\leq a<1\\ 0&\textit{Otherwise}\end{cases} \tag{9}\]  
The transform calculates the data points by summing and subtracting neighboring points. The horizontal and vertical components of the discrete wavelet transform are calculated by using these equations.