# A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding
## 1 Introduction  
The localization of circle centers has extensive applications in various fields. It is widely used for precise optical system targeting of circular objects, non-contact measurements of industrial circular components, quality assessment of industrial parts, and high-precision measurement methods for roundness errors, which have become hot topics in the field of industrial metrology [1; 2; 3; 4]. This paper presents a novel circle detection method based on the adaptive artificial fish swarm algorithm by determining the circle center and the radius of circular parts. A new fitness function was developed to evaluate the similarity of a candidate circle with a real circle. Based on the fitness values, a batch of encoded candidate circles was modified through the algorithm in order for them to match with the actual circles on the edge map [2]. In the process of automatic laser cladding of the water wall, a method for obtaining the center of the pipe was proposed to guarantee high fitting accuracy under the condition of small arc [3]. A highly efficient circle positioning algorithm called the two-step optimization Hough transform was proposed. Using the image feature of the printed circuit board circular identifier, the target circle was obtained using adaptive image pre-processing. It was successfully applied to a vision positioning system of a solder paste printing machine [4]. Circle center location is one essential process of systems, like the accurate positioning of circular markers' centers in photogrammetry or automatic camera calibration based on real image coordinates, as it directly determines the accuracy of measurement results [5]. Reference [6] proposes a method to calculate projection point of circle center using concentric circles. The method can be used to obtain the projection point of acircle center accurately and stably, and it does not have intrinsic projection errors. In the optical measurement field, circular artificial markers are the most widely used. The localization of circular markers is of primary importance in the measurement process. The high-precision circle center location of a wafer can implement the automatic acquisition of the special die, which is one of the most significant steps in wafer surface defect detection. Reference [7] proposed a novel circle center location method for the large-scale wafer. Furthermore, in terms of improving industrial automation levels and ensuring production safety, the identification and precise localization of circular targets also play significant roles [8; 9]. In laser scanning for large-scale 3D surface measurements, the height of a specific point on the target surface, corresponding to the objective spot, is determined by the position of the imaged spot on the CCD surface. The accurate determination of the laser spot position is a key factor in determining the measurement resolution [10]. In laser communication systems, a spot positioning method based on a four-quadrant detector has a higher positioning accuracy in the stable communication area of the system [11]. Reference [12] harnesses machine learning capabilities for precise circle detection, enhancing spatial awareness and facilitating UAV navigation in environments where circular features hold paramount significance. It can address the intricate challenges associated with optimized path scheduling and precise circle detection within unmanned aerial vehicles. In detecting defects of the color contact lenses, one significant defect is the \"center deviation defect\", where the colored area deviates from the center point. Reference [13] proposes a method that utilizes image processing and analysis techniques for detecting such defects. The approach involves employing semantic segmentation to simplify the image and reduce noise interference, utilizing the Hough circle transform algorithm to measure the deviation of the center point of the colored area in color contact lenses.