## 3 Experiments and Discussion
### Experimental Results and Discussion  
The experimental results can be seen in Table 2. In the table, \(N_{OK}\) means the number of samples that are detected as OK (no defect). For example, in column one, the number 93 means 93 out of 100 of \"No Defects\" in type A were detected as OK by our method, while \(N_{NG}\) in the same column means 7 out of 100 of \"No Defects\" in type A were detected as NG (with defects) by our method. FN means false negative, which means it should be positive (with defects), but the detection result of the algorithm is negative, while FP means false positive, which means it should be negative (no defects), but the result of the algorithm is positive. In the industrial application, FN is much more serious than FP. In our test, the FN is 1% and 0.5% using samples of type A and type B, respectively, while FP is 3.5% and 2.5%. From the results, we can find that there are still some cases that our method cannot detect correctly, and after a recheck of these samples, we found that these are truly \"hard samples\" that even experienced workers of the factory need to check very carefully from every possible observation angle. The total FN and FP results are at the same level as experienced works, while its efficiency is higher because it can work tirelessly. The time duration of both type A and type B was less than the corresponding interval time in Table 1, which means the system can achieve real-time detection in different sizes of input flat tubes; furthermore, the time duration can be much less if a better computer is used in the future. Some more detailed experimental results can be found in Figures 12-15. In every image of the results, there are four images: the first one is the input test image, the second one is the result of vertical projection histogram images of 10 sections, the third one is the curvature curves based on the histogram image, and the last one is the detection result, in which the green line indicates the location of the scratches. The green circles in the histogram images are the detected local peaks of the histogram by our algorithm. It can be seen from the experimental results that, although the defects in some input images were very weak, and some were even difficult for people to distinguish, after the method proposed in this paper, the local peaks where the defects are located were highlighted, and the background noise where it was located was suppressed. Eventually, all the defects were detected effectively, and the locations of the defects were marked. By analyzing and comparing the defects detected by the algorithm with the manually marked defects, it can be found that common and obvious surface defects both can be detected 100%, but when affected by the presence of volatile machine oil on the surface of some incoming flat tubes, the image characteristics were similar to the morphology of some of these surface scratch defects. Thus there will be a certain degree of misdetection, as shown in Figure 16. At the same time, for a small part of the detection of subtle scuffing defects, the algorithm did not detect them perfectly, that is, there was a certain degree of false negatives, but at the same time, it must be noted that the same missed detection can occur in this case, even for experienced workers. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Results**} & \multicolumn{2}{c}{**Type A**} & \multicolumn{2}{c}{**Type B**} \\ \cline{2-5}  & **No Defects** & **With Defects** & **No Defects** & **With Defects** \\ \hline Total sample number & 100 & 100 & 100 & 100 \\ \(N_{OK}\) & 93 & 2 & 95 & 1 \\ \(N_{NG}\) & 7 & 98 & 5 & 99 \\ Time consuming/ms & 459.32 & 478.24 & 87.65 & 98.31 \\ FN/\% & & 1\% & & 0.5\% \\ FP/\% & & 3.5\% & & 2.5\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experimental Results. Figure 12: Result 1. The green circles represent local maximums, red circles represent local valleys, and the green lines represent the detected scratches. Figure 13: Result 2.