A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding
Abstract
:1. Introduction
2. Theoretical Design of CLSDAT
2.1. Obtaining Pixel Points on the Circular Contour by Grid Method
2.2. Constructing a Data Set of Selected Circle Center Samples
2.3. Calculating the Optimal Solution for the Coordinate of the Circle Center
2.3.1. Mean Shift Vector and Its Clustering Algorithm
2.3.2. Kernel Method and Kernel Function
2.3.3. Introducing Gaussian Kernel Function and Weight Coefficient for Mean Shift Vector
- If the number of data samples is large enough and the data features are also significant, the linear kernel should be prioritized.
- If the number of data samples is moderate and there are relatively few data points, the Gaussian kernel should be preferred.
- If the number of data samples is large but the number of features is relatively small, it may be necessary to manually define some features and use the linear kernel.
2.4. Calculating the Center Coordinate with Different Sample Density Iteration
2.5. Determining the Adaptive Threshold
3. Algorithm Verification
- (1)
- The Hough transform exhibits high accuracy and strong anti-interference capabilities. However, in practical experiments, it was found that the Hough transform may detect multiple centers, requiring appropriate parameter settings to eliminate interference.
- (2)
- The circle fitting algorithm has the lowest accuracy among the three circle center localization algorithms. It is also more susceptible to interference.
- (3)
- The proposed CLSDAT algorithm achieves the highest accuracy, efficiently eliminating the impact of interference.
4. Conclusions
- 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.
- 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.
- 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.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
CLSDAT | Center Localization Based on Sample Density and Adaptive Threshold |
References
- Wang, S.; Zheng, P.; Kong, Y.; Zhu, Y.; Wang, G.; Zhang, X. A novel method for roundness error based on searching the center of the circle. Meas. Sci. Technol. 2022, 33, 095008. [Google Scholar] [CrossRef]
- Wang, W.; Lu, K.; Hong, R.; Chen, P.; Zhang, J.; Wang, B. A Machine Vision Method for Automatic Circular Parts Detection Based on Optimization Algorithm. In Intelligent Computing Theories and Application; Springer International Publishing: Berlin/Heidelberg, Germany, 2017; pp. 600–611. [Google Scholar] [CrossRef]
- Wang, M.; Ma, H. A method of circle center fitting for water wall cladding. Measurement 2022, 202, 111783. [Google Scholar] [CrossRef]
- Qi, M.; Wang, Y.; Chen, Y.; Xin, H.; Xu, Y.; Meng, H.; Wang, A. Center detection algorithm for printed circuit board circular marks based on image space and parameter space. J. Electron. Imaging 2022, 32, 011002. [Google Scholar] [CrossRef]
- Wu, K.; Ying, Q.; Wang, W.; Zhang, L.; Cheng, R.; Huang, Q. Calculation method of projection point of circle center in camera calibration. In Proceedings of the Tenth International Symposium on Precision Mechanical Measurements, Qingdao, China, 15–17 October 2021; Yu, L., Yang, L.X., Xia, H., Eds.; SPIE: Pontoise, France, 2021. [Google Scholar] [CrossRef]
- Lu Xiaodong, X.J.; Qican, Z. High Camera Calibration Method Based on True Coordinate Computation of Circle Center. Chin. J. Lasers 2020, 47, 0304008. [Google Scholar] [CrossRef]
- Deng, S.; You, J.; Tang, L.; Su, X. Circle Center Automatic Extraction and Sorting based on Improved Circular Target. Int. J. Perform. Eng. 2019, 15, 1417. [Google Scholar] [CrossRef]
- Zeng, J.; Wang, Y.; Wu, H.; Liu, G. Research on the Positioning Method of Steel Belt Anchor Holes Applied in Coal Mine Underground. Appl. Sci. 2024, 14, 4360. [Google Scholar] [CrossRef]
- Hou, W. Research on automatic hole making technology of industrial robot based on Hough circle detection algorithm. Int. J. Wirel. Mob. Comput. 2023, 24, 352–360. [Google Scholar] [CrossRef]
- Tan, Y.; Ali, M.; Lin, F.; Su, Z.; Liao, W.H.; Wong, H. Study on laser spot size measurement by scanning-slit method based on back-injection interferometry. Opt. Laser Technol. 2024, 172, 110472. [Google Scholar] [CrossRef]
- Wei, J.; Zhu, H.; Wang, Y.; Sun, N.; Liu, F.; Zhang, J.; Chen, Y.; Liu, J. Spot position scheme on a quadrant detector for a spaceborne laser communication system. Appl. Opt. 2024, 63, 3162. [Google Scholar] [CrossRef] [PubMed]
- Mishra, P.; Mishra, N. Machine Learning Approach for Unmanned Aerial Vehicle’s Path Scheduling and Precise Circle Detection. In Proceedings of the 2024 IEEE International Conference on Interdisciplinary Approaches in Technology and Management for Social Innovation (IATMSI), Gwalior, India, 14–16 March 2024; Volume 2, pp. 1–6. [Google Scholar] [CrossRef]
- Kim, G.N.; Kim, S.H.; Joo, I.; Kim, G.B.; Yoo, K.H. Center Deviation Measurement of Color Contact Lenses Based on a Deep Learning Model and Hough Circle Transform. Sensors 2023, 23, 6533. [Google Scholar] [CrossRef] [PubMed]
- Kumagai, S.; Hotta, K. Particle detection in intracellular images and radius estimation by circle fitting. IEEJ Trans. Electr. Electron. Eng. 2015, 10, 181–185. [Google Scholar] [CrossRef]
- Scitovski, R.; Marošević, T. Multiple circle detection based on center-based clustering. Pattern Recognit. Lett. 2015, 52, 9–16. [Google Scholar] [CrossRef]
- Cariou, C.; Le Moan, S.; Chehdi, K. A Novel Mean-Shift Algorithm for Data Clustering. IEEE Access 2022, 10, 14575–14585. [Google Scholar] [CrossRef]
Number | Hough Transform | Circle Fitting | CLSDAT |
---|---|---|---|
1 | 0.086 | 0.256 | 0.040 |
2 | 0.102 | 0.142 | 0.065 |
3 | 0.157 | 0.250 | 0.082 |
4 | 0.085 | 0.312 | 0.060 |
5 | 0.164 | 0.237 | 0.051 |
6 | 0.116 | 0.259 | 0.034 |
7 | 0.128 | 0.386 | 0.077 |
8 | 0.161 | 0.431 | 0.061 |
9 | 0.106 | 0.374 | 0.051 |
10 | 0.127 | 0.342 | 0.024 |
Average error | 0.123 | 0.299 | 0.055 |
Number | Hough Transform | Circle Fitting | CLSDAT |
---|---|---|---|
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 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Min, Y.; Chen, H.; Chen, Z.; Zhang, F. A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding. Appl. Sci. 2024, 14, 8453. https://doi.org/10.3390/app14188453
Min Y, Chen H, Chen Z, Zhang F. A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding. Applied Sciences. 2024; 14(18):8453. https://doi.org/10.3390/app14188453
Chicago/Turabian StyleMin, Yujin, Hao Chen, Zhuohang Chen, and Faquan Zhang. 2024. "A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding" Applied Sciences 14, no. 18: 8453. https://doi.org/10.3390/app14188453
APA StyleMin, Y., Chen, H., Chen, Z., & Zhang, F. (2024). A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding. Applied Sciences, 14(18), 8453. https://doi.org/10.3390/app14188453