## 3 Finite Element Simulation
### FEM Results
#### 3.2.5 FEM Results of an Inclined Rectangular Groove  
Case 10 is a rectangular groove with an inclined angle of 90\({}^{\circ}\). Case 11 is a rectangular groove with an inclined angle of 135\({}^{\circ}\). The specimen parameters are listed in Table 2. The simulation results of Case 10 and Case 11 are shown in Figure 14. The damage shape can be clearly visualized. It should be noted that the length of this defect is a little shorter than the actual value, while its width is obviously larger than the actual value. In addition, the orientation of the rectangular groove can be easily obtained and the computational process is introduced as below. In image processing, computer vision, and related fields, an image moment is a certain particular weighted average (moment) of the image pixels' intensities. Image moments and moment invariants are useful to describe global features in image processing [36]. Image moments are calculated under grayscale in order to distinguish the direction of the rectangular groove. \(G(x,y)\) denotes the pixel intensity of the gray value, where x, y are the row and column of the pixel matrix, respectively. The gray image must be processed by a threshold as we focus attention on the area where the rectangular groove is likely to exist rather than the whole area. \(I(x,y)\) is the pixel intensity obtained by setting a threshold at the level of \(-3\) dB. The zero moment is shown in Equation (16). The first moment is shown in Equation (17). The second moment is shown in Equation (18). These image moments can be used to extract image features [37]. \[M_{00}=\sum_{x}\sum_{y}I(x,y) \tag{16}\]  
Figure 14: Simulation results of Case 10 and Case 11. (**a**) Wavenumber distribution of Case 10; (**b**) depth distribution of Case 10; (**c**) wavenumber distribution of Case 11; (**d**) depth distribution of Case 11. The white rectangle represents the actual location of the damage. The actual depth of the defect is 1 mm. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Specimen** & **Actual Depth (mm)** & **Reconstructed Depth (mm)** & **Estimation Error of Depth** \\ \hline \multirow{3}{*}{Case 8} & No. 1 & 1 & 0.9976 & 0.24\% \\  & No. 2 & 1 & 0.9183 & 8.17\% \\ \multirow{3}{*}{Case 9} & No. 1 & 1 & 0.9524 & 4.76\% \\  & No. 2 & 1 & 0.9917 & 0.83\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The depth evaluations of Case 8 and Case 9. \[\left\{ \begin{array}{l}M_{10}=\sum\limits_{x}\sum\limits_{y}x\times I(x,y)\\ M_{01}=\sum\limits_{x}\sum\limits_{y}y\times I(x,y)\end{array} \right. \tag{17}\]  
\[\left\{ \begin{array}{l}M_{20}=\sum\limits_{x}\sum\limits_{y}x^{2}\times I(x,y )\\ M_{02}=\sum\limits_{x}\sum\limits_{y}y^{2}\times I(x,y)\\ M_{11}=\sum\limits_{x}\sum\limits_{y}x\times y\times I(x,y)\end{array} \right. \tag{18}\]  
\(M_{00}\), \(M_{10}\), and \(M_{01}\) are used to obtain the centroid coordinates of the feature image [38]. The calculation formulas are written as below. \[\left\{ \begin{array}{l}\overline{x}=\dfrac{M_{10}}{M_{00}}\\ \overline{y}=\dfrac{M_{01}}{M_{00}}\end{array} \right. \tag{19}\]  
The spindle orientation of the feature image can be obtained by calculating an angle, which is shown in the following equation. \[\Theta=\dfrac{\arctan(2\mu_{11}^{\prime}/(\mu_{20}^{\prime}-\mu_{02}^{\prime} ))}{2} \tag{20}\]  
where \(\mu_{11}^{\prime}\), \(\mu_{20}^{\prime}\), and \(\mu_{02}^{\prime}\) can be given by the following equations:  
\[\left\{ \begin{array}{l}\mu_{20}^{\prime}=\dfrac{M_{20}}{M_{00}}-\overline{x }^{2}\\ \mu_{02}^{\prime}=\dfrac{M_{02}}{M_{00}}-\overline{y}^{2}\\ \mu_{11}^{\prime}=\dfrac{M_{11}}{M_{00}}-\overline{x}\times\overline{y}\end{array} \right. \tag{21}\]  
Figure 15 shows the orientation of an inclined rectangular groove. The depth and angle evaluations are shown in Table 6. It is easy to find that the angle errors of Case 10 and Case 11 only reach 0.00% and 0.12%, respectively, while the depth errors of Case 10 and Case 11 rise to 12.95% and 13.60%, respectively. One reasonable explanation is clarified in the discussion section.