# A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding
## 3 Algorithm Verification  
To validate the effectiveness of the proposed circle center localization algorithm, a test is conducted using standard circles with center coordinates (255, 255).  
Figure 4: Data set of circle center samples.  
Figure 5: Center iteration process by different sampling density.  
Figure 6: Iteration process.  
Due to the human-induced interference contained in the template matching method, it is not compared. The Hough transform, circle fitting method, and the proposed CLSDAT algorithm in this paper are employed to detect the standard circles to compare their accuracy and efficiency. The experiments are conducted on a computer with an Intel(R) Core(TM) i7-10870H CPU operating at a frequency of 2.2 GHz, 16 GB memory with a frequency of 2133 MHz, running on a 64-bit Win10 operating system.  
A total of 10 positioning experiments are performed, with each experiment involving a different standard circle with a known and fixed center coordinate. Table 1 presents the experimental results for the three circle center localization algorithms, where the average error represents the average of the errors from the 10 positioning experiments and serves as a measure of accuracy. A smaller average error indicates better performance.  
The Hough transform algorithm requires setting a threshold on the number of data points that constitute a circle. In this experiment, the threshold is set to 100, which means if there are 100 or more data points, it is considered as a circle formed by these points.  
The circle fitting algorithm utilizes the method of least squares, which is a statistics-based detection method. It finds the best function fit for a set of data points by minimizing the sum of squared errors. Therefore, it does not require setting any parameters beforehand.  
The CLSDAT algorithm proposed in this paper constructs the sample data set with 60 divisions in both the horizontal and vertical directions, resulting in a total of 68,440 sample points.  
Figure 7 is the standard circle with additional interference. The experimental results of the interfered circle are shown in Table 2.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Number** & **Hough Transform** & **Circle Fitting** & **CLSDAT** \\ \hline
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 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Positioning errors of different circle central location algorithms (Unit: Pixels).  
Figure 7: Interfered standard circle.  
From Tables 1 and 2, the following observations can be made:  
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.