# End Face Attitude Detection of Special Steel Bars Based on Improved DBSCAN
## 4 Result Analysis of Steel Bar End Face Attitudes
### Estimation of Algorithm Execution Time  
Currently, the running speed of the steel bar surface defect detection line of the HBIS GROUP SHISTEEL COMPANY is 1 m/s, and the length of the bar is between 6 m and 12 m. This means that the bar end face attitude detection system must perform the end face attitude calculation within 6 s to meet the bar production line's timing requirements.  
\begin{table}
\begin{tabular}{l c c c c c c c c c c} \hline  & \(\leq\)**0.01** & \(\leq\)**0.03** & \(\leq\)**0.05** & \(\leq\)**0.07** & \(\leq\)**0.09** & \(\leq\)**0.10** & \(\leq\)**0.20** & \(\leq\)**0.50** & \(\leq\)**0.80** & \(\leq\)**1.10** \\ \hline Our Method (\%) & 16.89 & 43.17 & 67.78 & 84.94 & 97.17 & 100 & 100 & 100 & 100 & 100 \\ HT method (\%) & 2.50 & 5.22 & 9.67 & 13.44 & 17.11 & 18.89 & 41.28 & 94.28 & 99.22 & 100 \\ \hline \end{tabular}
\end{table}
Table 2: Statistics table of error data.  
Figure 9: Comparison of steel bar end face attitudes calculated using different methods: (**a**) Comparative display of attitude data. (**b**) The difference between the attitude data calculated using our method and the ideal data. (**c**) The difference between the attitude data calculated using the HT method and the ideal data.  
Our algorithm and the HT method are both implemented on the VS2019 platform, and the calculation time of 1800 images was statistically analyzed. The statistical results are shown in Figure 10a. Additionally, the same time-consuming statistical calculation is performed on the fast attitude detection algorithm, and the results are shown in Figure 10b.  
As shown in Table 3, the maximum, minimum, and average values of time consumption are also calculated under different conditions. In combination with Figure 10 and Table 3, it is apparent that both methods have more than 6 s of data before using the fast template. Although our method contains more data above 6 s, as long as there are more than 6 s calculation data, it cannot meet the minimum timing requirements of the production line. After using the fast template, it is obvious that the calculation time of the two methods is much reduced. The maximum time consumption of our method and the HT method is 3.656 s and 3.359 s, respectively, and the average calculation time is 2.254 s and 1.402 s, respectively. The results indicate that the two methods can meet the production line timing requirements after using the template. Although the HT method has some advantages in computing time, the advantages of both the maximum computing time and the average computing time are limited with respect to the required time of the production line of 6 s. From the perspective of detection accuracy, our method is much better than the HT method. Considering comprehensive performance, our method can provide more  
Figure 10: Calculation time of steel bar end face attitude angle: (**a**) Calculation time without template. (**b**) Calculation time with template.  
accurate data of end face attitude for bar surface defect grinding stations, which can be more effectively applied to industrial production lines.