## 2 The Principle of the Sine-Cosine Transform Wavelet Threshold Denoising Method  
The noise in shearography wrapping phase patterns is mainly additive Gaussian white noise. Suppose a noiseless pattern is \(f\). After adding Gaussian white noise \(z\) with the noise intensity \(\varepsilon\), the noiseless pattern degenerates the noisy pattern \(\tilde{f}\). The relationship between the noiseless pattern \(f\) and the noisy degraded pattern \(\tilde{f}\) can be expressed as [19]  
\[\tilde{f}=f+\varepsilon z \tag{1}\]  
In the denoising process, the wavelet basis function, decomposition levels, threshold, and threshold function directly affect the processing effect. The flowchart of the proposed algorithm is shown in Figure 1.  
Figure 1: Flowchart of the sine–cosine transform wavelet threshold denoising method. 1. [label=(0)]
2. Sine and cosine transform of the wrapped phase pattern. The wrapped phase pattern is transformed by sine and cosine transform, respectively. \[\left\{ \begin{array}{l}Spw=\sin\varphi\\ Cpw=\cos\varphi\end{array} \right.\] (2) where \(\varphi\) is the wrapping phase pattern and represents the pattern after the sine-cosine transform, respectively. (2) The sine and cosine patterns are decomposed into N levels by the sym4 wavelet basis function. The 2-D discrete wavelet transform (DWT) algorithm [21; 22] for patterns is shown in Figure 2. LOD means wavelet decomposition low-pass filter and HiD means wavelet decomposition high-pass filter. The 2-D DWT algorithm decomposes the low-frequency approximation coefficients \(c\tilde{f_{j}}\) into four parts at scale \(j~{}+~{}1\): (1) Low-frequency coefficients \(c\tilde{f_{j+1}}\) ; (2) horizontal detail coefficients \(cD^{(h)}{}_{j+1}\) ; (3) vertical detail coefficients \(cD^{(v)}{}_{j+1}\) ; (4) diagonal detail coefficients \(cD^{(d)}{}_{j+1}\). The wavelet decomposition transform can be expressed as  
\[c\tilde{f}=cf+c\epsilon z \tag{3}\]  
where \(c\) represents the wavelet decomposition transform, \(c\tilde{f}\) is the wavelet coefficients of the noisy degraded pattern \(\tilde{f}\), \(cf\) is the wavelet coefficients of the noiseless pattern \(f\), and \(c\epsilon z\) is the wavelet coefficients of the noise \(z\). The selection of the wavelet basis function should consider its support length, symmetry, vanishing moment, regularity, and similarity. Symlets wavelet is usually expressed as symM where M is \(2,3,\ldots,8\). Compared with other wavelets, the sym4 wavelet where M = 4 in symM has better symmetry to reduce phase distortion in signal analysis and reconstruction. Therefore, the sym4 wavelet is selected to decompose and reconstruct the wrapping phase pattern. Perform N-level decomposition on the sine and cosine patterns in step (1):  
\[\left\{ \begin{array}{l}cSpvw=cf_{1}+c\varepsilon_{1}z_{1}\\ cCpvw=cf_{2}+c\varepsilon_{2}z_{2}\end{array} \right. \tag{4}\]  
where \(f_{1},f_{2}\) are the ideal sine and cosine patterns, respectively, \(\varepsilon_{1},\varepsilon_{2}\) are the noise intensity of sine and cosine noisy patterns, respectively. And \(z_{1},z_{2}\) are random Gaussian noise in sine and cosine noisy patterns, respectively. (3) Threshold denoising for wavelet coefficients. After the wavelet basis function decomposes the noisy pattern, it is necessary to select the appropriate threshold and denoise the coefficients of each level with the threshold  
Figure 2: 2-D discrete wavelet transform (DWT) algorithm. function [23]. Therefore, it is essential to determine the threshold and threshold processing function. The selection of a threshold directly affects the effect of denoising. Currently, the main threshold selection methods are fixed threshold estimation, extreme threshold estimation, unbiased likelihood estimation, and heuristic estimation. But the above thresholds have nothing to do with the noise intensity. According to the global threshold form proposed by [PERSON] et al. [20], the fixed threshold form and noise intensity can filter out Gaussian white noise.