# Visual Ranging Based on Object Detection Bounding Box Optimization
## 4 Experimental Results and Analysis
### Object Detection Bounding Box Optimization Results  
Figure 6 visually shows the process of the bounding box optimization method for object detection proposed in Section 3.2.1, including object detection, preprocessing, non-interactive Grabcut segmentation, postprocessing, and scanning the edge contour to obtain the optimized bounding box. From the perspective of the process, the preprocessed image is clearer than the original image, so a better segmentation effect is achieved (as shown in Figure 7), and the edge contour extracted after removing excess pixel information after postprocessing is very good fit to the object. Thus, the final bounding box can be better suited to the object.  
Figure 8 visually shows the local comparison results before and after the object detection bounding box optimization. From the results, compared with the object detection before optimization, the bounding box of the optimized result is closer to the object.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameters** & Precision & Recall & [EMAIL_ADDRESS] & FPS (f/s) \\ \hline
**Result Values** & 99.9\% & 100\% & 99.5\% & 90.09 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Detection performance of model.  
Figure 6: Bounding box optimization process.  
To obtain a quantitative evaluation of the detection bounding box optimization method for detection objects, the two indicators WOV and HOV proposed in Section 3.2.2 are used for quantitative analysis. To facilitate the application of the results of bounding box optimization to the following visual ranging, tests are performed under the known conditions of 12 degrees of pitch angle and 10 degrees of height difference. The results of bounding box optimization are shown in Table 3, the changes in pixel width and pixel height before and after bounding box optimization are shown in Figure 8, where wbefore, hbefore, wafter, and hafter are the pixel width and pixel height before and after bounding box optimization, respectively.  
In Table 3, the optimized WOV of the bounding box ranges from 1.19% to 19.24%, and the HOV ranges from 0% to 12.14%, indicating that the pixel width and pixel height of the bounding box are optimized by 1.19-19.24% and 0-12.14%, respectively.  
In Figure 9, it is obvious that the pixel width and pixel height after optimization are smaller than before optimization. This method exploits the advantages of Grabcut segmentation in the bounding box optimization method by setting the area outside the detection bounding box as the background area, ensuring that the results obtained by this method are never worse than those obtained before bounding box optimization.  
Figure 8: Local comparison before and after object detection bounding box optimization: (**a**) before bounding box optimization; and (**b**) after bounding box optimization.  
Figure 7: Results of Grabcut segmentation with and without CLAHE preprocessing: (**a**) segmentation results without preprocessing; and (**b**) segmentation results with preprocessing.  
In summary, the proposed object detection bounding box optimization method is evaluated from two aspects: visualization and numerical results. This evaluation demonstrates that the proposed method can eliminate pixel spacing and improve the fit degree between objects and bounding boxes.