# Nondestructive Surface Crack Detection of Laser-Repaired Components by Laser Scanning Thermography
## 4 Scanning Thermography for Crack Detection of Repair Component
### Experimental Results and Analysis  
The thermal image processing and analyses are at the core of crack detection quality. Therefore, we take thermal images scanned along the direction of 0\({}^{\circ}\) as an example to show the process of thermal image processing, as shown in Figure 13. Firstly, the infrared camera is used to collect the n-frame thermal image in the laser scanning process, \(n\) = 1550. Then, MATLAB is used to digitize the thermal image sequence, as shown in Figure 13b. Further analysis is conducted based on digital image processing technique. The first image is taken as the reference image, representing the background temperature field without thermal excitation. The temperature change sequence is obtained by subtracting the reference image from other frames, and the post-processing analysis is conducted on this basis. In the post-processing process, the shape and geometric distribution of cracks are extracted by the enhancement and segmentation algorithms of temperature change images. The commonly used post-processing algorithms include first-order and second-order gradient algorithms, edge detection algorithms, etc., and the detection quality is different to some extent [10; 38; 39; 40; 41]. In Figure 13c, we compare and analyze the detection effects of the traditional gradient algorithm and several commonly used edge detection algorithms. In Table 4, we compare the number of parameters and calculation time of several algorithms. The processor type used for calculation is Intel (R) Core (TM) i7-10870H CPU. The results show that the traditional first-order and second-order gradient algorithms require more parameters, the parameter adjustment process is relatively tedious and the calculation time is long. Figure 13: Detailed processing workflow for thermal images: (**a**) Thermal images acquired by an infrared camera; (**b**) Digital thermal image sequence converted by MATLAB; (**c**) Post-processing results of digital thermal image sequence. The edge detection algorithms based on Prewitt, Robert and Sobel operators can achieve higher SNR detection results, and the crack edge positioning is more accurate, the detection precision can be improved to be 1 pixel, and the calculation time is reduced. Among them, edge detection based on Prewitt has the shortest computation time, and has significant detection capability for horizontal and vertical cracks. For the thermographic detection of the surface crack of laser-repaired components, the SNR and calculation time of the detection results are taken into consideration, and the edge detection based on Prewitt operator is selected for post-processing of the temperature change image sequence. By calculating the edge information of the temperature change image, the high-precision and rapid detection of the crack shape and geometric position is achieved. Figure 14 shows the scanning and detection results of laser spot along the four directions: 0\({}^{\circ}\), 45\({}^{\circ}\), 90\({}^{\circ}\) and 135\({}^{\circ}\). The edge detection algorithm based on Prewitt operator is used to process the temperature change image sequence. As can be seen that when scanning along a certain direction, the crack parallel to the laser scanning direction can be clearly detected, while not the case for the perpendicular cracks. When scanning in a single direction, it is impossible to detect all the crack information, so the combination of scanning in multiple directions must be used [10]. Therefore, several combinations of laser scanning modes are considered to achieve comprehensive crack detection. After the collection and processing of thermal image, the detection results are obtained as shown in Figure 15. When the scanning combination along \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Number of Parameters** & **Computing Time/s** \\ \hline First-order gradient & 5 & 19.7 \\ Second-order gradient & 5 & 24.6 \\ [PERSON] edge detection & 2 & 3.32 \\ [PERSON] edge detection & 2 & 3.41 \\ [PERSON] edge detection & 2 & 5.16 \\ \hline \hline \end{tabular}
\end{table}