# A Prototype for Computing the Distance of Features of High-Pressure Die-Cast Aluminum Products
## 4 Results and Discussion
### Spatial Distances  
This section presents the results and analysis of using YOLOv3 with three HPDC aluminum workpieces: a housing, bracket, and cover. Each piece includes a figure illustrating the sequence of image processing and two tables: one with a summary of the detected features (e.g., cast bore, drilled bore, machined flange, and screw seat) and another with a particular feature (drilled bore) positions in pixels and mm for comparison with the specified measurements, the columns x and y represent the center of a feature, and x, y, and z are the corresponding values in mm. Extra columns show the calculated distance, the specified distance by design, and the absolute error. The first row represents the center of the feature considered as the base to compute the distances in the subsequent rows.  
Cover. This workpiece was new to the model (not seen before). The frontal image depicts three machined flanges (12 mm), twelve drilled bores (6 mm), six screw seats (8 mm), and three casted bores. Figure 12 illustrates the workpiece on the circular plate, the detected features, and the depth image. Table 7 indicates the number of features of the workpiece. The prototype's detection accuracy reaches an average of 81.2% for the cover piece. Table 8 exhibits the results for the drilled bores' distances compared to the specified distances. It describes eleven drilled bores, with an average error of 0.123 mm and a maximum error of 0.27 mm for a distance of 113.0 mm, representing a 0.24% error.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{1}{c}{**Feature**} & \multicolumn{1}{c}{**Quantity**} & \multicolumn{1}{c}{**Detected**} & \multicolumn{1}{c}{**Accuracy**} \\ \cline{2-7}  & \multicolumn{1}{c}{Cast Bore} & 5 & 2 & 40.0\% \\ \multicolumn{1}{c}{Drilled Bore} & 7 & 7 & 100.0\% \\ \multicolumn{1}{c}{Screw Seat} & 7 & 7 & 100.0\% \\ \hline \hline \end{tabular}
\end{table}
Table 5: Summary of detected characteristics for the bracket.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{1}{c}{**Feature**} & \multicolumn{1}{c}{**Quantity**} & \multicolumn{1}{c}{**Detected**} & \multicolumn{1}{c}{**Accuracy**} \\ \hline \hline \multicolumn{1}{c}{Cast bore} & 3 & 3 & 100.0\% \\ \multicolumn{1}{c}{Drilled bore} & 12 & 11 & 91.7\% \\ \multicolumn{1}{c}{Machined flange} & 3 & 1 & 33.3\% \\ \multicolumn{1}{c}{Screw seat} & 6 & 6 & 100.0\% \\ \hline \hline \end{tabular}
\end{table}
Table 7: Summary of detected characteristics for the cover.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{1}{c}{**Feature**} & \multicolumn{1}{c}{**Quantity**} & \multicolumn{1}{c}{**Detected**} & \multicolumn{1}{c}{**Accuracy**} \\ \hline \hline \multicolumn{1}{c}{Cast bore} & 3 & 3 & 100.0\% \\ \multicolumn{1}{c}{Drilled bore} & 12 & 11 & 91.7\% \\ \multicolumn{1}{c}{Machined flange} & 3 & 1 & 33.3\% \\ \multicolumn{1}{c}{Screw seat} & 6 & 6 & 100.0\% \\ \hline \hline \end{tabular}
\end{table}
Table 8: Detected centers of drilled bores and relative distance to the first point (cover).  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{1}{c}{**Feature**} & \multicolumn{1}{c}{**Quantity**} & \multicolumn{1}{c}{**Detected**} & \multicolumn{1}{c}{**Accuracy**} \\ \hline \hline \multicolumn{1}{c}{**Flexls**} & \multicolumn{1}{c}{**Y**} & \multicolumn{1}{c}{**x**} & \multicolumn{1}{c}{**y**} & \multicolumn{1}{c}{**z**} & \multicolumn{1}{c}{**Calculated D**} & \multicolumn{1}{c}{**Specified D**} & \multicolumn{1}{c}{**|}{**Error I**} \\ \multicolumn{1}{c}{**Pixels**} & & \multicolumn{1}{c}{**mm**} & \multicolumn{1}{c}{**mm**} & \multicolumn{1}{c}{**mm**} & \multicolumn{1}{c}{**mm**} & \multicolumn{1}{c}{**mm**} \\ \hline \hline
246 & 357 & 37 & 198 & 303 & 0.000 & 0.000 & 0.000 \\
272 & 386 & 74 & 221 & 344 & 59.825 & 60.000 & 0.175 \\
290 & 315 &