# Integrated Image Processing Toolset for Tracking Direction of Metal Grain Deformation
## 5 Application for Tracking the Direction of Metal Grain Deformation  
Once the proposed algorithms are integrated, the observer can extract the boundary of a specific grain target and trace its location on global coordinates. This allows for a further analysis to understand the metal grain deformation. One the application proposed in this study is integrated processing for tracking the direction of the grain deformation, which works based on the understanding that the area inside the GB on the equiaxed structure will expand owing to the plastic force [66]. In addition, the elastic force also will cause a transverse elongation and axial compression on the GB with respect to the Poisson ratio. Furthermore, the GB of the specific grain targets is extracted on the initial condition and after experiencing loads and then being stacked on the global coordinates. To track the shifting value of the grain deformation in detail, a basic unit in the finite-element analysis (FEA) was initiated to generate the quadratic mesh elements on the GB poly shapes with the same element size limits (Figure 14a,b). The shifting of the mesh element coordinates before and after the deformation was the input for calculating the direction of grain deformation. Unfortunately, the direct integration of the elements led to ambiguous results owing to the unbalanced number of nodes. Because of the deformed geometry, the GB area after the deformation was somewhat expanded, thus increasing the number of elements in the mesh. Thus, the corresponding nodes before and after the deformation were sequentially traced using the minimum variance value of the coordinate shift, which synchronized the mesh element on the GB area and matched the corresponding nodes. Finally, the deformation direction was arranged using a quiver plot on the Cartesian coordinates according to the shifting value of the optimized nodes (Figure 14c). To amplify the directional signals, the O-grid generalization method was applied to the results (Figure 14d). This technique was chosen because of the difference in the concentrations of the nodes near the GB and at the center of the grain. The O-grid technique works by calculating the average direction trend based on four corresponding grid areas near the starting point and amplifying the minority nodes to make them uniform. \begin{table}
\begin{tabular}{c c c c c c c} \hline \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{**Parameter**} & \multicolumn{5}{c}{**Feature Detector**} \\ \cline{3-6}  & & **BRISK** & **HARIS** & **MSER** & **ORB** & **SURF** \\ \hline \multirow{6}{*}{Raw Specim} & R2 & 0.999 & 0.999 & 0.999 & 0.999 & 0.999 & 0.999 \\  & RSME & 1.433 & 2.626 & 1.908 & 1.279 & 1.631 \\  & MAE & 1.071 & 1.82 & 1.409 & 0.636 & 1.232 \\  & SE & 0.105 & 0.181 & 0.115 & 0.089 & 0.103 \\  & \(t\)-Statistic & 7.495 & 5.69 & 7.606 & 9.981 & 9.575 \\  & \(p\)-Value & \(<\)0.0001 & \(<\)0.0001 & \(<\)0.0001 & \(<\)0.0001 & \(<\)0.0001 \\  & Avg\_Residual & 0.00 \(\pm\) 0.981 & 0.0 \(\pm\) 0.996 & 0.00 \(\pm\) 1.007 & 0.00 \(\pm\) 0.997 & 0.00 \(\pm\) 0.986 \\ \hline \multirow{6}{*}{Weld Specim} & R2 & 0.999 & 0.999 & 0.999 & 0.999 & 0.999 \\  & RSME & 1.247 & 2.365 & 1.636 & 1.675 & 1.421 \\ \cline{1-1}  & MAE & 0.972 & 1.475 & 1.245 & 1.245 & 1.078 \\ \cline{1-1}  & SE & 0.088 & 0.145 & 0.097 & 0.099 & 0.087 \\ \cline{1-1}  & \(t\)-Statistic & 5.045 & 7.71 & 5.982 & 6.391 & 8.04 \\ \cline{1-1}  & \(p\)-Value & \(<\)0.0001 & 0.016 & \(<\)0.0001 & \(<\)0.0001 & \(<\)0.0001 \\ \cline{1-1}  & Avg\_Residual & 0.00 \(\pm\) 0.987 & 0.00 \(\pm\) 0.994 & 0.00 \(\pm\) 0.998 & 0.00 \(\pm\) 0.999 & 0.00 \(\pm\) 1.002 \\ \hline \end{tabular}
\end{table} 
Table 2: Comparison of the image-matching performance using linear regression model analysis from five FD methods on raw and weld datasets: BRISK, HARIS, MSER, ORB, and SURF.