Proceedings of the 2011 International Conference on Machine Learning and Cybernetics, Guilin, 10-13 July, 2011 AN EFFECTIVE NON-HT CIRCLE DETECTION FOR CENTERS AND RADII LI-QIN JIA1, HONG-MIN LIU1, ZHI-HENG WANG1, HONG CHEN2,3 1 School of Computer Science and Technique, Henan Polytechnic University, Jiaozuo 454000, China 2 Department of physics, Anshan Normal University, Anshan 114005, China 3 College of information science and engineering, Northeastern University, Shenyang 110819, China E-MAIL: [email protected], [email protected], [email protected], [email protected] Abstract: We present a non-HT circle detection algorithm applied to search the centers and radii of circular or partially circular components present in the image. The line coincident with the gradient vector of each edge point and passing through the corresponding edge point is defined first. Then, for every pixel in the image, the number of the lines passing through this pixel is defined as the energy of the pixel. The feature circle energy (FCE) distribution map of the whole image is therefore obtained and the local maxima are corresponding to the centers of potential circles. For the detection of radius, the gradient magnitudes in assigned region are accumulated and its variation defined as the feature circle radius (FCR) is computed who has maximum when the radius of the region is equal to that of the circle. Synthetic images and natural images are used to test the capability of the proposed method. The experimental results indicate that the presented algorithm has excellent performance for detection of single circle, multiple circles, concentric circles and partial circles, and also good accuracy despite the presence of different noises. Keywords: Circle detection; center detection; radius detection; concentric circle; partial circle 1. Introduction In the field of pattern recognition, circle detection is important and has been extensively studied and applied widely, such as automatic inspection and assembly, target locating and medical images in the past decades [1-2]. Hough transform (HT) is the most straightforward method for the circle-detection, which provides enough robust but requires massive computation and memory. In order to overcome the limitations of HT, some new approaches based on HT were proposed. e.g., the probabilistic HT [3], the randomized HT [4-5] and the fuzzy HT [6].The common methods of HT based take advantage of the equation but bring about large computation. In addition, other non-HT based methods were also provided. Ramirez et al. [7] presented a circle detection method based on genetic algorithms and Chung et al. [8] presented a fast randomized algorithm to solve the center-detection problem. These algorithms show good accuracy or time save for the detection of circles, but the algorithms are also complex. A non-HT based method is proposed in this paper for detecting the centers and radii of the circles in the images. Firstly, Gauss template is applied to compute the gradient of the image. Secondly, every edge point of a circle and its gradient define a line, which passes through the center. The feature circle energy (FCE) is defined and computed in which the local maxima correspond to the centers. Thirdly, the gradient magnitudes are accumulated and its variation is computed to give the feature circle radius (FCR) which shows the radius of the circle. This approach avoids the voting processing in HT-based algorithm which raises the computation efficiency, moreover results in an accurate detection of the center and radius and easy understanding. The application results of the proposed method to both synthetic and natural images are presented abundantly. The remainder of this paper is organized as follows. Section 2 introduces the principle of the method. Section 3 gives a detailed description for this method in steps. Section 4 displays the application results of the method on both synthetic and natural images. The conclusions are presented in Section 5. 2. Principle of the proposed method For a circle, the gradient vector of an edge point points at the center of the circle, so a line, coincident with the gradient vector and passing through the edge point, should also pass through the center of the circle, that is to say the distance of the center to the line is zero. For every edge points of the circle, there also exists a corresponding line on which the center lying. As Fig.1 shows, the center of a circle is indicated as O, and a line L defined by edge point A passes through the center O. The lines defined by all the edge points of the image are determined firstly such as line L displayed in Fig.1. Then, for a pixel B, the distance values of pixel B to 978-1-4577-0308-9/11/$26.00 © 2011 IEEE 814 Proceedings of the 2011 International Conference on Machine Learning and Cybernetics, Guilin, 10-13 July, 2011 the lines are computed. The energy of pixel B is defined as the number of the distance value equal to zero, in other words, as the number of the lines passing through the pixel B. With the same way, the energy of the every pixel is computed to obtain the feature circle energy (FCE) distribution map of the whole image. When a pixel is the center of a circle, the lines defined by the edge points of the circle will all pass through the pixel to get a larger energy compared with that of non-center pixel. Therefore, detection of the local maxima in the FCE distribution map can locate the centers of the potential circles present in the image. Figure 1. The energy of point B add 1 if B is on the line defined by point A For determining the radius of a circle, the gradient magnitudes of the pixels in a region centering on the potential center of the circle are accumulated in the image. If the region is smaller than the area of the circle, the variation of accumulation changes little. But when the radius of the region is equal to that of the circle, the accumulation has a large variation and keeps steady with the increase of the radius until another concentric circle is found. So the FCR, defined as the variation of gradient magnitudes accumulation in the region, gives the radii on which large variations happen. This is the basis of our method for detecting the center and radius of the circle. 3. Proposed Method Based on the principle of the method, we proposed an algorithm to detect the centers and radii of the circles. 3.1. Compute the feature circle energy (FCE) and get the center Canny detector is used to get the edge of the image and Pi (i = 1, 2, ", N ) denotes an edge point. The gradient of each pixel in the image is computed by using Gauss template. The line defined by the position and gradient of edge point Pi is indicated as Li (i = 1, 2, ", N ) . For a pixel X in the image, the distance between the X and the line Li is computed, which is presented as di =|| X − Pi || (i = 1,2, ", N ) and the energy of X adds 1 if di < 2 . For the whole image, the energy of every pixel is computed and the FCE is obtained. In order to detect the local maxima in the FCE distribution map, a threshold T is applied, which is determined with equation (1): T = Mean(E ) + k ⋅ Std (E ) (1) in which the Mean(E ) and Std (E ) respectively represents the mean and standard deviation of the FCE distribution map, and the factor k in the equation is a coefficient in the range of 2~3 in a general way. A circular region is defined whose radius is 2R1 + 1 where R1 is the maximal searching region radius and can be 5~10 as a general rule. The local maximum can be obtained by using function ordfilt 2 . For a point X , it is considered as a local maximum when its energy is equal to the maximum in the circular region and larger than T in the FCE distribution map. The position of the maximum corresponds to the center of a circle. 3.2. Compute the feature circle radius (FCR) and get the radius For detecting the radius of a circle, an accumulation S is defined to accumulate the gradient magnitudes of the pixels in the region which is centered on O (the circle center we just get) and of a radius of R2 . The value of R2 increases from 1 to the edge of image with 1 as interval. Since the gradient of pixels in circle is zero (only the gradient of noise points is not zeros when there exists noise in image), the S changes greatly when R2 equals to the radius of circle. The FCR is defined to describe the variation of S in which the position of maximum indicates the radius of circle. The radii of concentric circles consisting of two circles or more can be obtained by searching the positions of the first several maximum in FCR, which means the radii of concentric circles can be determined easily using the proposed method. 4. Experiment results Experiment tests have been developed both on synthetic and natural images in order to evaluate the performance of the provided method. 4.1. Synthetic images As shown in figure 2 (a), an image with two different circles of size 83×158 is generated in order to evaluate the performance of the proposed method. The FCE distribution map is shown in figure 2 (b), in which the intensity of potential centers of the circles are larger obviously than other pixels. The FCR distribution map of the first detected circle 815 Proceedings of the 2011 International Conference on Machine Learning and Cybernetics, Guilin, 10-13 July, 2011 (the bigger one) is shown in figure 2 (c), in which gradient magnitudes accumulation change greatly when the searching radius is 33, that means radius of the bigger circle is 33. As the same way, the radius 19 of the second circle is obtained in its corresponding FCR shown as figure 2 (d). The corresponding detected centers and radii of circles are displayed in figure 2 (e). The centers and radii are accurately detected. Figure 5 shows the noise resisting of the method. Figure 5 (a)-(c) display the original image and the edge and circle detected results. When Gaussian noise ( σ 2 = 0.001) is added, the edge image and the detected results is shown in Figure 5 (e) and (f) respectively. Figure 5 (h)-(j) display the results of adding Salt & Pepper noise ( σ 2 = 0.03). The good results show that the proposed method has good resisting for the noise effects. Figure 3 shows the detection result of concentric circles. A 83×158 original image with concentric circles is shown in Figure 3 (a). During the detection of radii, a threshold T is set and the positions of maximal values bigger than T in corresponding FCR are obtained. The detection result is shown in Figure 3 (b), which indicates the centers and radii of concentric circles accurately. (a) The result of proposed method on partial circles is shown in Figure 4. The original image is shown in Figure 4 (a) which describes a half and a quarter circle, and the detection result is shown as (b). For the accumulating region of gradient magnitudes starts from the center detected and the region radius increases one pixel by one pixel, the accumulation variation is little because only few pixel having gradient magnitudes until the region radius equal to the radius of circle. Test results show that the proposed method can detect the centers effectively only using an arc of a quarter round. (a)The original image Figure 3. Detection of concentric circles (a) (b) Figure 4. Detection of partial circles (a) (b)The FCE distribution map 5 (b) (b) (c) 5 x 10 5 x 10 5 (d) 0 0 20 (c) The FCR of first circle 40 0 0 10 20 (e) (f) 30 (d) The FCR of second circle (h) (i) (j) Figure 5. Detection of circles with noise (e) Detected centers and radii of circles Figure 2. Detection of two circles 4.2. Natural images In this experiment the proposed algorithm is tested upon natural images. Figure 6 shows the detection of moon. The 816 Proceedings of the 2011 International Conference on Machine Learning and Cybernetics, Guilin, 10-13 July, 2011 detection result is displayed as Figure 6 (b) where the center is marked with red “+” and the radius of the moon is obtained to display the circle with red lines. Figure 7 shows us the detection of golf, and result indicated as Figure 7 (b) where the center and center are all in blue. The test demonstrates the proposed method has excellent detection performance on both single and multiple circles. Figure 8 display the detection results of concentric circles. A coin shown as Figure 8 (a) is detected. The detected centers and radii are all shown in red. The detection results display the proposed method can detect the center and radii of concentric circles accurately. The partial moon is detected and Figure 9 gives the origin image and result which shows the detection accuracy of the proposed method on partial circle. Figure 9. Detection of partial moon 5. Conclusions In this paper, a non-HT circle detection algorithm for centers and radii is proposed. The positions and gradient of edge points of candidate circle defines lines and the center is the pixel passed through by the most lines. The radius is obtained by searching the position of gradient magnitudes accumulation greatly changes. The experimental results indicated that our algorithm can be effectively applied to detect the centers and radii of single circle, multiple circles, concentric circles and partial circles, and has good accuracy despite of the presence of different noises. Acknowledgements Figure 6. Detection of moon This work is supported by National Natural Science Foundation of China (61005033), Open Projects Program of National Laboratory of Pattern Recognition (20090018) and Doctor Degree Foundation of Henan Polytechnic University (B2010-39, B2010-68). References Figure 7. Detection of golf Figure 8. Detection of tire [1] C.T. Ho, L.H. Chen, “A fast ellipse/circle detector using geometric symmetry”, Pattern Recognition, pp. 117–124, 28 (1) , 1995. [2] T.C. Chen, K.L. Chung, “An efficient randomized algorithm for detecting circles”, Computer Vision and Image Understanding, pp. 172–191, 83 (2) , 2001. [3] Shaked, D., Yaron, O., Kiryati, N., “Deriving stopping rules for the probabilistic Hough transform bysequential analysis”, Computer Vision Image Understanding, pp. 512–526, 63, 1996. [4] Xu, L., Oja, E., and Kultanen, P., “ A new curve detection method: Randomized Hough Transform (RHT)”, Pattern Recognition Letters, pp. 331–338, 11(5), 1990. [5] Xu L, Oja E, Kultanen P., “Randomized Hough Transform( RHT) : basic mechanisms, algorithms, and computational complexities”, Comput Vision Graphics Image Process: Image Understanding, pp. 131- 154, 57( 2), 1993. 817 Proceedings of the 2011 International Conference on Machine Learning and Cybernetics, Guilin, 10-13 July, 2011 [6] Han, J.H., Koczy, L.T., Poston, T., “Fuzzy Hough Transform”, In Proc. 2nd Int. Conf. on Fuzzy Systems, pp. 803–808, vol. 2, 1993. [7] V. A. Ramirez, C. H. G. Capulin, A. P. Garcia, R. E. S. Yanez, “Circle detection on images using genetic algorithms”, Pattern Recognition, pp. 652-657, vol. 27, 2006. [8] K. L. Chung, Y. H. Huang, J. P. Wang, T. C. Chang, H. Y. M. Liao, “Fast randomized algorithm for center-detection”, Pattern Recognition, pp. 2659-2665, vol. 43. 2010. 818
© Copyright 2026 Paperzz