False circle detection algorithm based on Minimum Support ...

1 downloads 0 Views 443KB Size Report
KIIT University. Bhubaneswar, India. Abstract— Circle detection over digital images has received considerable attention from the computer vision community.
ICETACS 2013

False Circle Detection Algorithm based on Minimum Support Percentage and Euclidean Distance Virendra Kumar Yadav

Saumya Batham

Amit Kumar Mallik

School of Computer Engineering KIIT University Bhubaneswar, India [email protected]

School of Computer Engineering KIIT University Bhubaneswar, India

School of Computer Engineering KIIT University Bhubaneswar, India

Abstract— Circle detection over digital images has received considerable attention from the computer vision community over the last few years devoting a tremendous amount of research seeking for an optimal detector. Circle detection algorithms which were proposed till now have some limitations. One major limitation is detection of false circles in image. An efficient method of detecting false circles, called False Circles Detection Algorithm (FCDA) based on Minimum S upport Percentage (MS P) and Euclidean Distance is presented. The proposed algorithm can be used along with the existing algorithms giving better results. Experimental results over some real industrial images show that the proposed algorithm is efficient in terms of accurate detection. Keywords—False circles, Super Pixels(SP), Minimum Support Percentage(MSP), Euclidean Distance, Edge Pixel Intensity Threshold, Center Candidate

I.

INT RODUCT ION

In everyday experience circular features are commonly sought in digital image processing. The problem of detecting circular features is very important for image analysis, in particular for industrial applications such as automatic inspection of manufactured products and components, aided vectorisation of drawings, target detection, mechanical parts[1], and particle trajectories[2, 3] etc. Traditional approaches to circle detections consist of two stages, an edge detection stage and circle detection s tage using the edge detection result. This approach contains several problems. First, the initial edge detection is noise sensitive. Second, the second stage depends on first stage and also it does not use all the information available in the image and therefore incorrect decisions made in the first stage cannot be corrected in the second stage. The Circular Hough Transform (CHT) and several modified versions have long been recognized as robust techniques for circle detection and have been largely applied by the scientific community [4, 5]. The circle detection algorithms which were proposed till now shown good accuracy or time save for the detection of circles but still have some limitations. False circle detection is one of them. The contribution of work presented here is to show proposed algorithm works well for detecting real circles in images. The paper is organized as follows. Section 2 introduced related works performed by researchers in this domain. Section 3 includes the concept of the proposed metho d. In

978-1-4673-5250-5/13/$31.00 ©2013 IEEE

section 4 proposed the algorithm of proposed work. Section 5 shown the results of proposed algorithm and section 6 conclude the paper. II.

RELAT ED W ORKS

The construction of real circle detection algorithm is one of the most challenging tasks because images are sensitive to noise and other complexities involved in processing. Various algorithms were proposed in this domain but Circular Hough Transform (CHT) has long been recognized as robust techniques for circle detection. The circle is actually simpler to represent in parameter space. The circle equation is r2 = (x−a)2+(y−b)2 (1) As it can be seen the circle got three parameters a, b and r. Center of the circle in x and y direction is given by a and b, r is the radius. Circle parametric representation is given by x = a + r cos (θ) (2) y = b + r sin (θ) (3) Thus the parametric space for a circle will belong to R3 . As the number of parameters needed to describe the shape increases as well as the dimensions of the parameter space R increases so do the complexity of the Hough Transform. So with the Circle Hough Transform, we expect to find triplets of (x, y, R) that are highly probably circles in the image. First find out the edges using Canny edge detection algorithm. For each edge point, draw a circle assuming that edge point as center with the desired radius. The circle is drawn in the parameter space (fig 1). The „a‟ value is the x-axis, „b‟ value is the y-axis while the z-axis is the radii in the parameter space of the circle drawn. At the coordinates which belong to the perimeter of the drawn circle we increment the value in our accumulator matrix which essentially has the same size as the parameter space. In this way for each edge point in the input image drawing circles with the desired radii and incrementing the values in our accumulator. When completed with every edge point and every desired radius, turn attention to the accumulator. The numbers in the accumulator will represent the number of circles passing through the individual coordinates. Thus the highest numbers (selected in an intelligent way, in relation to the radius) corresponds to the center of the circles in the image. Figure 2 represent the concept of the Circular Hough Transform.

ICETACS 2013

Some authors also proposed some of the algorithms which were not based on the Hough concept. Fei SHANG proposed an algorithm “An Improved Circle Detection Method based on Right Triangle inscribed in a circle” [6]. In this paper authors proposed method named Semi-Random Detection (SRD) based on right triangles inscribed in a circle (RTIC). Teh-Chuan Chen and Kuo-Liang Chung proposed concept which was not based on the Hough Transform [7]. In their paper “An Efficient Randomized Algorithm for Detecting Circles” concept is as to select four edge pixels in the image and then try to find out the circle in the image. “An Effective Non-HT circle detection for centers and radii” was proposed by Li-Qin JIA1, LIU1, WANG1 and CHEN [8].

threshold is required, finding a robust value which works under all circumstances is a major problem which typically cannot be solved in a satisfactory way, resulting in false circles detection. III.

CONCEPT OF PROPOSED M ET HOD

Concept of proposed method is explained in this section. First we have to apply any robust circle detection algorithm on given image to find the number of circles or circular objects. The result obtained after this step may contain some false circles. So we go for False Circle Detection Algorithm (FCDA). From the result, we have centers and radii for detected circles. For each detected circle, we calculate number of super pixels. Super pixels for a circle can be calculated by performing following steps. First, find out the coordinates of pixels lying on the circumference of circle considered. Second, whatever coordinates obtained, find out the pixel intensity of that coordinate in edge detected image resulted after canny operation. If for a coordinate, pixel intensity is greater than Tepi (Edge Pixel Intensity Threshold) then consider it super pixel. For circle, find out the MSP (Minimum Support Percentage). MSP is given by number of super pixels calculated for the particular circle divided by the total number of pixels lying on the circumference of that circle. Mathematically

(4) Fig.1. Parametric space representation of single circle

Fig.2. Circular Hough T ransform concept

Some problems still exits and many researchers are working in this domain. In all the algorithm it is common, using an edge detection algorithm find all edges in the image under consideration and then analyze the edge image to find particular circle. The main problems with these approaches are that circle detection algorithms are sensitive to various types of noises and the detection of circles is now two step process. If an incorrect decision is made during the first stage also known as edge detection stage, it cannot be corrected in the second stage (circle detection stage). Furthermore, threshold required by most of the edge detection algorithms for which points belong to edges and which do not. Whenever a

Set a threshold TMSP (Minimum Support Percentage Threshold). It is generally set according to application requirements. If calculated MSP is greater than T MSP , put this circle center and radius as recommended candidate. Perform the above procedure for each of the circle detected by the algorithm applied. The result of whole complete procedure will have certain number of recommended circles candidate. They have to pass one more test. Select a distance threshold according to application requirements. Sometimes over an image under consideration, algorithm detects two or more circle nearby for one of the circle after first stage test T MSP . To make it more clear suppose for a particular circle, algorithm detects two circles whose centers lie within the distance threshold or less than distance threshold. Then the circle with higher MSP will considered as the real candidate. We have performed this test with the help of mathematics equation called Euclidean distance (Edis ) given by Edis = ((X2 – X1 )2 + (Y2 – Y1 )2 )1/2

(5)

Where (X1 , X2 ) and (Y1 , Y2 ) are coordinates. Find each circle center distance with each other circle center with the help of equation 5. If distance is less than required T ED (Euclidean Distance Threshold) then consider the circle with higher MSP as right candidate else center is correct candidate. Finally plot the results.

-71-

ICETACS 2013

IV.

PROPOSED A LGORIT HM

TABLE I.

The algorithm of our work is as follows: 1) 2) 3) 4) 5) 6) 7) 8)

Process_Circle_Detection (image) { center (a,b); radius (r); } False_Circle_Detection_Algorithm (a,b,r) { calculate circumference coordinates using equations 2 and 3. 9) Consider I (gray scale image containing only edge obtained after edge detection step) 10) Pixel_Intensity = I(x,y); 11) If Pixel_Intensity > Tepi 12) { 13) Super_Pixel = +1; // increment in number of super // pixels after each detection 14) check next coordinate ; 15) } 16) Calculate MSP with the help of equation 5. 17) Check_condition1(MSP >T MSP ) 18) { 19) yes, recommended circle candidate; 20) no, discard circle candidate; 21) } 22) perform these steps for each circle detected 23) check_condition2( Tcal > Tdis ) 24) { 25) yes, right circle candidate 26) no, consider the candidate with higher MSP 27) } 28) }// algorithm ends here 29) Plot the results V.

EXPERIMENT AL RESULT S

In this experiment the proposed algorithm is tested upon various images. „multipellet.jpg‟ and „singlepellet.jpg‟ are amongst them and shown in figure 3 and figure 7 respectively. Consider figure 3 which contains sixteen pellets (counted manually), nearly circular in shape. After applying circle detection algorithm, the calculated result shows twenty pellets (figure 5). This means result contains some false pellet number. After applying FCDA we obtain sixteen pellets which is true result (figure 6). Similarly for figure 7, the image contains single pellet, but applying again circle detection algorithm results in two counted pellets (figure 9). After FCDA operation the result shows single pellet (figure10) which is true number of pellet in original image (figure 7). Histogram of figure 3 and figure 7 is also shown in figure 4 and figure 8 respectively. Comparison result is shown in table 1.

Experiment no.

Image dimensions

True circles in image

result (circle detection algorithm)

FCDA re sult

1

480 X 640

16

20

16

2

105 X 100

1

2

1

VI.

CONCLUSION AND FUT URE RESEARCH DIRECT ION

In this paper we have proposed FCDA algorithm. FCDA algorithm can be used along with the existing algorithms or concept can be applied in developing new algorithm. The experimental results indicated that our algorithm can be effectively applied to detect and remove fals e circles from calculated results. Future research domain include the areas such as algorithm optimization, reduction in complexity of algorithm, accurate circle detection etc. A CKNOWLEDGMENT This work was supported by KIIT University, Bhubaneswar, Odisha. We would also like to thanks our professors Amitavo Sen, M. N. Das, A. K. Bisoi, Anuja kr. Acharya, P.K. Patnaik, Srikanth Asoodi, Shikhar Chandra, and A. K. Yadav for their valuable suggestions during various discussion sessions they had made. REFERENCES [1] U. M . Landau, “Estimation of a circular arc center and its radius,”Comput. Vis. Graph. Image Process., no. 38, pp. 317– 326, Jun. 1986. [2] J. F. Crawford, “A noniterative method for fitting circular arcs to measured points,” Nucl. Instrum. M eth. Phys. Res., no. 211, pp. 223–225, 1983. [3] V. Karimäki, “Effective circle fitting for particle trajectories,” Nucl. Instrum. M eth. Phys. Res., no. 305, pp. 187–191, 1991. [4] J. lllingworth and J. Kittler. A survey of the hough transform Comprrle,: Vision, Graphics, I,nage Processing, 44:87-1 16, 1988. [5] V. E Leavers. Survey: Which hough transform. Image Unrlersmnding. 58:250-264. 1993 [6] Fei SHANG, Jinwei LIU, Xiao ZHANG, Di TIAN, “An improved circle detection method based on right triangles inscribed in a circle”, 2009 World Congress on Computer Science and Information Engineering. [7] Teh-Chuan Chen and Kuo-Liang Chung, “An Efficient Randomized Algorithm for Detecting Circles”, Computer Vision and Image Understanding 83, 172–191 (2001). [8] LI-QIN JIA1, HONG-M IN LIU1, ZHI-HENG WANG1, HONG CHEN, “An Effective non-HT Circle Detection For Centers and Radii”, Proceedings of the 2011 International Conference on M achine Learning and Cybernetics, Guilin, 1013 July, 2011. [9] Li-qin JIA, Cheng-zhang PENG, Hong-min LIU, Zhi-heng WANG, “A Fast Randomized Circle Detection Algorithm”, 2011 4th International Congress on Image and Signal Processing. [10] A. Goneid, S. El-Gindi, A. Sewisy, “A M ethod for Hough Transform Detection of Circles And Ellipses Using A 1Dimensional Array”, 1997 IEEE. [11] Simon Just Kjeldgaard Pedersen, “Circular Hough Transform”, Aalborg University, Vision, Graphics, and Interactive Systems, November 2007.

-72-

ICETACS 2013

Fig. 3. Original image (multipellet.jpg)

Fig. 4. Histogram of original image (multipellet.jpg)

Fig. 5. Result obtained after applying circle detection algorithm

Fig. 6. Result of FCDA

Fig. 7. Original Image (singlepellet.jpg)

Fig. 8. Histogram of original image (singlepellet.jpg)

Fig. 9. Result obtained after applying circle detection algorithm

Fig. 10. Result of FCDA

-73-