# A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding
## 4 Conclusions  
This paper proposes a circle center localization algorithm based on sample density and adaptive thresholding, exhibiting the following highlights:  
1. Construction of a circle center sample data set: The algorithm constructs a sample data set of circle centers, which contains a large amount of data by forming a circle center point based on any three contour pixels.
2. Utilization of mean shift clustering algorithm: The algorithm employs the mean shift clustering algorithm to calculate the optimal solution for the density of candidate circle center sample data. It introduces a fast Gaussian kernel with an adaptive bandwidth to address the weighting issue of sample points, improving the efficiency and accuracy of the algorithm.
3. Iterative algorithm with adaptive threshold: By seeking the region with the highest sample density using an iterative algorithm, the algorithm excludes points that are far from the target circle center based on the circle center sample density and adaptive thresholding. This effectively filters out bad data and enhances the robustness of the algorithm.  
By leveraging these techniques, the proposed algorithm achieves accurate circle center localization and demonstrates improved robustness in dealing with various scenarios.  
Experimental results demonstrate that the proposed algorithm achieves high accuracy, with a positioning error of only 0.051 pixels. It also exhibits strong resistance to interference, as the positioning accuracy remains nearly unchanged even when interference is introduced. In the presence of interference, the algorithm outperforms the Hough transform by 64.1% and the circle fitting algorithm by 86.4% in terms of the localization accuracy. However, due to the requirement for multiple iterations, it involves a longer processing time. When time consumption is not a primary concern, increasing the amount of circle center sample data can further improve the accuracy of the algorithm.  
Conceptualization, F.Z.; methodology, Y.M.; software, H.C.; validation, Y.M.; formal analysis, Z.C.; investigation, Y.M.; resources, Z.C.; data curation, Y.M.; writing--original draft preparation, Z.C.; writing--review and editing, F.Z.; visualization, F.Z.; supervision, F.Z.; project administration, Y.M.; funding acquisition, F.Z. All authors have read and agreed to the published version of the manuscript.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Number** & **Hough Transform** & **Circle Fitting** & **CLSDAT** \\ \hline
1 & 0.105 & 0.352 & 0.035 \\
2 & 0.162 & 0.412 & 0.044 \\
3 & 0.132 & 0.325 & 0.063 \\
4 & 0.121 & 0.216 & 0.062 \\
5 & 0.164 & 0.474 & 0.041 \\
6 & 0.154 & 0.379 & 0.058 \\
7 & 0.173 & 0.262 & 0.062 \\
8 & 0.162 & 0.371 & 0.066 \\
9 & 0.136 & 0.553 & 0.052 \\
10 & 0.115 & 0.398 & 0.021 \\ Average error & 0.142 & 0.374 & 0.051 \\ \hline \end{tabular}
\end{table}
Table 2: Positioning errors under interfered standard circle. (Unit: Pixels).  
**Funding:** This research was funded by National Natural Science Foundation of China of Funder, grant number 62001333.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The data present in this study are available upon request from the corresponding author. The data are not publicly available due to privacy restrictions.  
**Acknowledgments:** The authors express sincere gratitude for the support received from various project funds, which were instrumental in facilitating the successful completion of this research endeavor. In addition, the authors wish to thank the reviewers for their useful and constructive comments.  
**Conflicts of Interest:** The authors declare no conflicts of interest.