# Denoising of Wrapped Phase in Digital Speckle Shearography Based on Convolutional Neural Network
## 2 Theoretical Analysis and Proposed CNN Denoiser  
### Related Theoretical Model of DSSPI  
In this study, the Wollaston shearing system is used as an example to introduce DSSPI. As shown in Figure 1, a helium-neon laser is irradiated on the object surface after beam expansion, and the scattered field emitted from the diffuse reflective object surface is imaged by the Wollaston shearing system (object surface-shearing imaging). The intensity of the sheared scattered field is recorded by the CCD and stored in the computer.  
For single-beam laser irradiation, assume that \(I_{o1}\) and \(I_{o2}\) are the intensity of the speckle fields corresponding to the two points \(O_{1}(x_{0},y_{0})\) and \(O_{2}(x_{0}+\Delta x,y_{0}+\Delta y)\) on the object surface recorded at one point on the CCD, which can be expressed as  
\[I_{o1}(x,y)=A_{1}\exp[i\varphi_{1}(x,y)], \tag{1}\]  
\[I_{o2}(x,y)=A_{2}\exp[i\varphi_{2}(x,y)], \tag{2}\]  
Figure 1: Digital speckle-shearing interferometry system.  
where \(A_{1}\) and \(A_{2}\) are the beam amplitudes corresponding to \(I_{o1}(x,y)\), \(I_{o2}(x,y)\) respectively, and \(\varphi_{1}(x,y)\) and \(\varphi_{2}(x,y)\) are the initial phases of the two speckle fields. Before the deformation of the object, the intensity recorded on the CCD can be written as  
\[I_{1}(x,y)=\left|I_{o1}(x,y)+I_{o2}(x,y)\right|^{2}=I_{o1}(x,y)+I_{o2}(x,y)+2 \sqrt{I_{o1}(x,y)I_{o2}(x,y)}\cos[\Delta\varphi(x,y)], \tag{3}\]  
where \(\Delta\varphi(x,y)=\varphi_{2}(x,y)-\varphi_{1}(x,y)\), denotes the initial phase difference. The intensity distribution of the speckle field after the object is deformed by the load can be expressed as  
\[I_{2}(x,y)=I_{o1}(x,y)+I_{o2}(x,y)+2\sqrt{I_{o1}(x,y)I_{o2}(x,y)}\cos[\Delta \varphi(x,y)+\Delta\delta(x,y)], \tag{4}\]  
where \(\Delta\delta(x,y)=\delta_{2}(x,y)-\delta_{1}(x,y)\). \(\delta_{1}(x,y)\) and \(\delta_{2}(x,y)\) are the deformation phases of the two speckle fields, and \(\Delta\delta(x,y)\) denotes the deformation phase difference. The intensity distributions before and after the deformation are subtracted and squared to obtain the speckle fringe pattern, which can be expressed as  
\[E(x,y)=\left[I_{2}(x,y)-I_{1}(x,y)\right]^{2}=8I_{o1}(x,y)I_{o2}(x,y)\sin^{2} \biggl{[}\Delta\varphi(x,y)+\frac{\Delta\delta(x,y)}{2}\biggr{]}\left[1-\cos \Delta\delta(x,y)\right] \tag{5}\]  
By Equations (3)-(5), the speckle fringe patterns are obtained by the four-step phase-shift method [1] with phase shifts of \(-3\alpha\), \(-\alpha\), \(\alpha\), and \(3\alpha\).  
\[E_{i}(x,y)=A(x,y)+B(x,y)\cos[\Delta\delta(x,y)+(2i-5)\alpha],\ i=1,2,3,4 \tag{6}\]  
The phase distribution of the object deformation is obtained by Equations (7) and (8).  
\[\Delta\delta(x,y)=\arctan\biggl{\{}\tan\beta(x,y)\frac{\left[I_{2}(x,y)-I_{3 }(x,y)\right]+\left[I_{1}(x,y)-I_{4}(x,y)\right]}{\left[I_{2}(x,y)+I_{3}(x,y) \right]-\left[I_{1}(x,y)+I_{4}(x,y)\right]}\biggr{\}}, \tag{7}\]  
\[\beta(x,y)=\arctan\sqrt{\frac{3[I_{2}(x,y)-I_{3}(x,y)]-\left[I_{1}(x,y)-I_{4}( x,y)\right]}{\left[I_{2}(x,y)-I_{3}(x,y)\right]+\left[I_{1}(x,y)-I_{4}(x,y) \right]}}, \tag{8}\]  
The phase distribution can be further derived so that  
\[\Delta\delta(x,y)=\arctan\frac{S_{0}(x,y)}{C_{0}(x,y)}, \tag{9}\]  
where \(S_{0}(x,y)\) is sine fringe patterns, \(C_{0}(x,y)\) is cosine fringe patterns. \(\Delta\delta(x,y)\) is the wrapped phase containing speckle noise, which is distributed in \((-\pi/2,\pi/2]\).