# Sharpness-Based Distance Detection
## 4 Conclusions  
In this paper, the target object was first located with object detection, and then the definition of the target object was evaluated by setting up CNN, and the distance of the object was measured using an infrared laser rangefinder and a tape measure. Then the function curve between the definition and the distance was drawn with the Pycharm 2023 software, and the distances corresponding to different definitions were generated by computer. The feasibility of this technique was verified with several experiments. The results of comparison experiments show that this technique has a more accurate ranging ability.  
For object ranging, though the combination of sharpness ranging is undoubtedly a new road, this method has a variety of advantages, for traditional laser and radar ranging is easy to be interfered with by other equipment. Visual ranging is not easily affected. In particular, the extensive use of solid-state lidar may fill the scene with signal pollution, thus affecting the effect of laser detection. In visual ranging, the definition ranging proposed in this paper has many advantages. Firstly, it can measure the distance of unknown objects, whereas the previous monocular and binocular ranging needed the size of the known object to be able to calculate the distance. Secondly, it requires a small amount of computation, whereas the current 3D scene reconstruction will reconstruct the environment around the object to measure the distance and this process requires a lot of calculation. Thirdly, its measurement accuracy is high; as mentioned in this paper, using the YOLO method for ranging, results in relatively large errors. This is because the size of the target object is set to a fixed value before calculation, but in reality, the size of the target object is unknown, which will lead to a large error in the final ranging. Compared with other visual ranging methods, it can be better used in the field of transportation, military and other related fields.  
Conceptualization, W.D. and C.Z.; methodology, W.D.; software, Y.J.; validation, W.D., C.Z. and Y.J.; formal analysis, W.D.; investigation, Y.J.; resources, W.D. and C.Z.; data curation, Y.J.; writing--original draft preparation, Y.J.; writing--review and editing, Y.J.; visualization, Y.J.; supervision, W.D.; project administration, W.D. and C.Z.; funding acquisition, W.D. and C.Z. All authors have read and agreed to the published version of the manuscript. This research was funded by the Shenzhen Science and Technology Program (Grant No. ZDSYS20200811143600001). Not applicable. Not applicable. Not applicable. Data Availability Statement: Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Experimental Methods** & **Actual Value** & **Predicted Value** & **Magnitude of Error** & **Actual Value** & **Predicted Value** & **Magnitude of Error** \\ \hline \multirow{2}{*}{Sharpness ranging method} & 8.833 m & 8.870 m & \(\approx\)0.5\% & 11.404 m & 11.391 m & \(\approx\)0.1\% \\ \cline{2-6}  & 8.656 m & 8.561 m & \(\approx\)1.1\% & 11.316 m & 11.291 m & \(\approx\)0.2\% \\ \hline \multirow{2}{*}{Distance measuring method combined with YOLO method} & 8.833 m & 7.65 m & \(\approx\)13\% & 11.404 m & 9.49 m & \(\approx\)16\% \\ \cline{2-6}  & 8.656 m & 7.47 m & \(\approx\)14\% & 11.316 m & 9.52 m & \(\approx\)16\% \\ \hline \multirow{2}{*}{Monocular distance measurement was performed in combination with CNN} & 8.833 m & 8.01 m & \(\approx\)0.9\% & 11.404 m & 10.31 m & \(\approx\)1.0\% \\ \cline{2-6}  & 8.656 m & 7.89 m & \(\approx\)0.8\% & 11.316 m & 10.07 m & \(\approx\)1.1\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of experimental results of different methods.