## 2 Image Processing and Wavelet Transform
\[\phi_{j,m,n}(x,y)=2^{\frac{j}{2}}\phi\left(2^{j}x-m,\;2^{j}y-n\right) \tag{5}\]  
\[\psi_{j,m,n}^{i}(x,y)=2^{\frac{j}{2}}\psi^{i}\left(2^{j}x-m,\;2^{j}y-n\right) i=\left\{H,V,D\right\} \tag{6}\]  
When these functions are defined separately, the analysis of the 2D function becomes more straightforward, allowing for a focus on the design of 1D wavelets and scale functions. The modified decomposition and synthesis equations are presented as Equations (7)-(9) [34]. \[W_{\phi}(j_{0},m,n)=\frac{1}{\sqrt{MN}}{\sum_{x=0}^{M-1}\sum_{y=0}^{N-1}f(x,y )\phi_{j0,m,n}(x,y)}. \tag{7}\]  
\[W_{\psi}^{i}(j,m,n)=\frac{1}{\sqrt{MN}}{\sum_{x=0}^{M-1}\sum_{y=0}^{N-1}f(x,y )\phi_{j,m,n}^{i}(x,y)}.\;i=\left\{H,V,D\right\} \tag{8}\]  
\[f(x,y)=\frac{1}{\sqrt{MN}}\sum_{m}\sum_{n}W_{\phi}(j_{0},m,n)\phi_{j0,m,n}(x,y )+\frac{1}{\sqrt{MN}}\sum_{i=H,V,D}\sum_{j=j0}^{\infty}\sum_{m}\sum_{n}W_{ \psi}^{i}(j,m,n)\phi_{j,m,n}^{i}(x,y) \tag{9}\]  
The 2D wavelet transform is implemented by applying the 1D wavelet transform to each row and then applying the 1D wavelet transform to each column. Figure 4C illustrates the generation of the 2D wavelet transform at one level. For a deeper understanding of the concept of the 2D wavelet transform, let us examine it in two dimensions. Initially, the rows of the 2D signal undergo a 1D wavelet transform, dividing the signal into low-frequency (L) and high-frequency (H) components, as depicted in Figure 5A. The L component comprises signal parts with gradual changes along the horizontal axis, while the H component includes rapid changes. In the next stage, by applying a one-dimensional wavelet transform along the columns, these two components are also decomposed into two high-frequency and low-frequency components on the vertical axis. In other words, the L component is further decomposed into high-frequency and low-frequency components, denoted as LL and LH, in the direction of the columns. The LL component encompasses a portion of the signal characterized by slow variations in horizontal and vertical directions, resembling the original signal closely. The LH component contains a portion of the signal with rapid variations in the horizontal direction and slow variations in the vertical direction. Suppose we have an image with 21 rows, where the first 10 rows are nearly constant in both vertical and horizontal directions, and the eleventh row differs from them, simultaneously displaying constant variations in the horizontal direction. In that case, the eleventh row will exhibit rapid changes in the vertical direction and slow changes in the horizontal direction, and these changes will manifest in the LH component of the image at corresponding locations. Similarly, image H is decomposed into two components: HH and HL, with the HL component incorporating a portion that exhibits rapid variations in the horizontal direction and slow variations in the vertical direction, while the HH component encompasses a portion that displays rapid variations in both horizontal and vertical directions, or, in other words, rapid changes in the diagonal direction. Figure 5B illustrates the final decomposition of the image into these four components. As demonstrated, horizontal lines are represented along the HL axis, vertical lines along the LH axis, and diagonal lines along the HH axis. In general, it can be asserted that the LH image accentuates variations along the vertical axis, the HL image emphasizes changes along the horizontal axis, and the HH image spotlights changes along the diagonal axis. Conversely, the LL image essentially serves as the initial image from which high-frequency components and noise have been somewhat removed [34; 35]. Figure 6 depicts an image and its decomposition using a two-dimensional wavelet transform. \[f[n]=\frac{1}{\sqrt{M}}{\sum_{k}W_{\varnothing}[j_{0},k]\varnothing_{j_{0},k}[n ]}+\frac{1}{\sqrt{M}}{\sum_{j=j_{0}}^{\infty}\sum_{k}W_{\psi}[j,k]\psi_{j,k}[n]}. \tag{1}\]0 (**A**) The first step in extracting the two-dimensional wavelet transform at two levels [34].