<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AM</journal-id><journal-title-group><journal-title>Applied Mathematics</journal-title></journal-title-group><issn pub-type="epub">2152-7385</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/am.2019.1010061</article-id><article-id pub-id-type="publisher-id">AM-95914</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  An Improved Randomized Circle Detection Algorithm Using in Printed Circuit Board Locating Mark
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Jingkun</surname><given-names>Liu​</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Qi</surname><given-names>Fan</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Chengyi University College, Jimei University, Xiamen, China</addr-line></aff><aff id="aff2"><addr-line>Xiamen Sinic-Tek Intelligent Technology Co., Ltd., Xiamen, China</addr-line></aff><pub-date pub-type="epub"><day>26</day><month>09</month><year>2019</year></pub-date><volume>10</volume><issue>10</issue><fpage>848</fpage><lpage>861</lpage><history><date date-type="received"><day>14,</day>	<month>September</month>	<year>2019</year></date><date date-type="rev-recd"><day>20,</day>	<month>October</month>	<year>2019</year>	</date><date date-type="accepted"><day>23,</day>	<month>October</month>	<year>2019</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  This paper presents an improved Randomized Circle Detection (RCD) algorithm with the characteristic of circularity to detect randomized circle in images with complex background, which is not based on the Hough Transform. The experimental results denote that this algorithm can locate the circular mark of Printed Circuit Board (PCB).
 
</p></abstract><kwd-group><kwd>Circle Detection</kwd><kwd> Randomized Algorithm</kwd><kwd> Characteristic of Circularity</kwd><kwd> Printed Circuit Board</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Detecting circles from a digital image is very important in image processing [<xref ref-type="bibr" rid="scirp.95914-ref1">1</xref>] and computer vision [<xref ref-type="bibr" rid="scirp.95914-ref2">2</xref>]. This problem has extensive application value in engineering such as product inspection and assembly, traffic monitoring, robot vision, face recognition, vectorization of hand-sketched drawing. For example, it plays an important role in the production of Printed Circuit Board (PCB) to achieve automatic positioning of PCB and to locate the reference point named as fiducial mark. Fiducial marks are used to locate the position of all features on PCB. In recent years, two main research directions are how to improve the accuracy and reduce the computation performance.</p><p>As the most well-known approach for circle detection, Hough Transform (TH) [<xref ref-type="bibr" rid="scirp.95914-ref3">3</xref>] has gained the widespread interest from researchers. Standard Circle Hough Transform (CHT) [<xref ref-type="bibr" rid="scirp.95914-ref4">4</xref>] has been shown with possessing robustness in dealing with noisy images. Set ( x , y ) be an edge pixel on a circle with center coordinates ( a , b ) and radius r, the circle can be represented by</p><p>( x − a ) 2 + ( y − b ) 2 = r 2 . (1)</p><p>Each edge pixel ( x , y ) in the image can be mapped into a conic surface in the three-dimensional ( a , b , r ) -parameter space. Although the technique can regularly achieve a relatively high degree of accuracy, there are some influencing factors such as huge demand of memory space for the accumulator and high computational complexity due to the time-consuming voting procedure. Several HT-based methods have been developed to overcome these problems. Randomized Hough Transform (RHT) [<xref ref-type="bibr" rid="scirp.95914-ref5">5</xref>] relative to CHT has faster processing speed and smaller storage requirement. RHT uses three noncollinear edges to deal with the three parameters ( a , b , r ) of Equation (1). This method randomly selects three edge pixels in the image with equiprobability every time, and the corresponding mapped pixel in the three-dimensional parameter space is collected. RHT performs well in high quality image, but low performance in noisy image.</p><p>In place of creating an accumulator array for mapping the extracted edge pixels in images to the circle parameters in HT-based method, Randomized Circle Detection (RCD) [<xref ref-type="bibr" rid="scirp.95914-ref6">6</xref>] does not use an accumulator for saving the information of related parameters in Randomized Sample Consensus (RANSAC) [<xref ref-type="bibr" rid="scirp.95914-ref7">7</xref>] based method. The main concept is that the algorithm randomly chooses four edge pixels from the image first, and then uses a distance criterion to determine whether they belong to a possible circle in the image. After finding a possible circle, RCD uses an evidence-collecting step to further determine whether the candidate circle is a real-circle. Since RCD does not need extra accumulator storage, the memory requirements needed in RCD are only a few variables, and the method has some other advantages such as real-time speed and more robust to noise. However, sampling for RCD randomly happens on all edge pixels of the whole image and verification of the hypothetical circles also use all the edge pixels, which both occupy a mass of time and obtain uncertainty of results [<xref ref-type="bibr" rid="scirp.95914-ref8">8</xref>]. To solve these problems, an improved randomized circle detection algorithm in the complex background image is proposed in the paper, which uses improved RCD algorithm and the characteristic of circularity. Firstly, the improved RCD based on connected contours is applied to detect possible circles. Then, the characteristic of circularity is used to discard some inaccurate possible circles. The algorithm is faster than RCD for it samples only on the connected curve [<xref ref-type="bibr" rid="scirp.95914-ref8">8</xref>]. The experimental results show that the refined algorithm has good detection performance.</p><p>In this paper, we search circles with an improved RCD algorithm in the complex back ground image, and use the characteristic of circularity to eliminate incorrect circles. Simulation results show that the proposed algorithm can locate circle mark effectively in PCB. The rest of this paper is organized as follows: Section 2 discusses the theory about normal Randomized Circle Detection (RCD). Section 3 introduces the improved Randomized Circle Detection in detail. Section 4 states the experimental results. Finally, some conclusions are given in Section 5.</p></sec><sec id="s2"><title>2. Randomized Circle Detection (RCD)</title><p>This section describes the algorithm of standard RCD. Store all edge pixels v i = ( x i , y i ) to the set V. Any three noncollinear pixels v i = ( x i , y i ) , i = 1 , 2 , 3 can exactly determine one circle C 123 . By Equation (1), we have</p><p>2 x i a 123 + 2 y i b 123 + r 123 2 − a 123 2 − b 123 2 = x i 2 + y i 2 ,             i = 1 , 2 , 3. (2)</p><p>A representation of Equation (2) in terms of matrix form</p><p>( 2 x 1 2 y 1 1 2 x 2 2 y 2 1 2 x 3 2 y 3 1 ) ( a 123 b 123 r 123 2 − a 123 2 − b 123 2 ) = ( x 1 2 + y 1 2 x 2 2 + y 2 2 x 3 2 + y 3 2 ) (3)</p><p>Applying Gaussian elimination and Cramer’s rule, the center ( a 123 , b 123 ) can be obtained by</p><p>a 123 = | x 2 2 + y 2 2 − x 1 2 − y 1 2 y 2 − y 1 x 3 2 + y 3 2 − x 1 2 − y 1 2 y 3 − y 1 | 2 ( x 2 − x 1 ) ( y 3 − y 1 ) − 2 ( x 3 − x 1 ) ( y 2 − y 1 ) , (4)</p><p>b 123 = | x 2 − x 1 x 2 2 + y 2 2 − x 1 2 − y 1 2 x 3 − x 1 x 3 2 + y 3 2 − x 1 2 − y 1 2 | 2 ( x 2 − x 1 ) ( y 3 − y 1 ) − 2 ( x 3 − x 1 ) ( y 2 − y 1 ) . (5)</p><p>After obtaining the center ( a 123 , b 123 ) , the radius can be calculated by</p><p>r 123 = ( x i − a 123 ) 2 + ( y i − b 123 ) 2 ,             i = 1 , 2 , 3. (6)</p><p>Let v 4 = ( x 4 , y 4 ) be the fourth edge pixel, then the distance between v 4 and the boundary of the circle C 123 denoted by</p><p>d 4 → 123 : = | ( x 4 − a 123 ) 2 + ( y 4 − b 123 ) 2 − r 123 | , (7)</p><p>where | z | denotes the absolute value of z. The four edge pixels v i = ( x i , y i ) , i = 1 , 2 , 3 , 4 can obtain four circles C 123 , C 124 , C 134 , C 234 with respect to four distances d 4 → 123 , d 3 → 124 , d 2 → 134 , d 1 → 234 . If d l → i j k is smaller than the given threshold T d , these four edge pixels are co-circular and the circle C i j k is a possible circle. If the four distances are all larger than T d , RCD algorithm chooses the other four edge pixels.</p><p>Set a counter C = 0 for this possible circle in order to count how many edge pixels lie on the possible circle. For each edge pixel v n in V, if d n → i j k ≤ T d , the counter C will be incremented by one and v n should be taken out of V; otherwise the next edge pixel will be proceed to. Continue above process until all the edge pixels in V have been examined. In the evidence-collecting process, the final value of C is equal to n p which is the number of edge pixels on the possible circle. If n p is larger than the given global threshold T g , the possible circle is claimed to be true. Otherwise, we discard the false circle and return those n p edge pixels back into V.</p><p>In practical application, the following thresholds are used to search circle in image:</p><p>The standard RCD algorithm has some advantages such as fewer memory requirements, faster speed and simpler algorithm than CHT or RHT.</p></sec><sec id="s3"><title>3. The Improved RCD Algorithm</title><p>This section presents the improved algorithm consisting of the following. The general idea is to reduce the computational complexity and enhance the accuracy by extracting connected contours. It can discard some inaccurate possible circles by using characteristic of circularity.</p><sec id="s3_1"><title>3.1. Noise Suppression</title><p>In order to obtain higher recognition quality, an image preprocessing is used to suppress and eliminate noise from image. A Gaussian smoothing is a widely used to reduce image noise, which is represented by Gaussian filter [<xref ref-type="bibr" rid="scirp.95914-ref9">9</xref>]. Gaussian filter is a windowed filter of linear class with weighted nature, which is calculated according to Gaussian distribution. Gaussian filter in the most general function form of</p><p>G σ ( x ) = 1 2 π σ e − x 2 2 σ 2 , (8)</p><p>in one-dimensional is able to fulfill this criterion optimally, where σ is the standard deviation of the Gaussian curve. In two-dimensions the Gaussian filter is defined by</p><p>G σ ( x , y ) = 1 2 σ 2 π e − x 2 + y 2 2 σ 2 (9)</p><p>This filter can be separable by</p><p>G σ ( x , y ) = G σ ( x ) G σ ( y ) . (10)</p><p>In order to remove small details from the image and fill small gaps in lines or curves, the Gaussian filter should be used before other operations. The above mentioned Gaussian filter is used in continuous domain. In one discrete digital image, a discrete Gaussian low-pass filter should be used. The value of every pixel in the image will be replaced by the average of the intensity levels in the neighborhood defined by the filter mask. Because the smoothing process leads to “un-sharp” transition in intensities, smoothing filters have the undesirable side effect, which blur edges of object. In order to keep the balance between eliminating random noise and preserving sharpness of edges, the Gaussian filter with mask size 3 &#215; 3</p><p>1 9 &#215; ( 1 1 1 1 1 1 1 1 1 ) (11)</p><p>should be used in our experiment. It can be best seen by substituting the coefficient of the mask into the characteristic response R [<xref ref-type="bibr" rid="scirp.95914-ref10">10</xref>] with the sum of products as</p><p>R = ∑ k = 1 9 w k z k = W T Z , (12)</p><p>where W and Z are nine-dimensional vectors formed from the coefficients of a 3 &#215; 3 filter mark and the image intensities are encompassed by the mask respectively. Then we obtain</p><p>R = 1 9 ∑ i = 1 9 z i . (13)</p><p><xref ref-type="fig" rid="fig1">Figure 1</xref> shows the results of applying a Gaussian smoothing in digital image. As expected from the Gaussian filter with mask size 3 &#215; 3 , the detail of noise is blurred.</p></sec><sec id="s3_2"><title>3.2. Edge Detection</title><p>The purpose of edge detection is to identify points in digital image at which the image brightness changes sharply. In the past 30 years, there are many methods for edge detection, but most of them can be classified into two categories, the Template Matching (TM) and the Differential Gradient (DG) [<xref ref-type="bibr" rid="scirp.95914-ref11">11</xref>]. In either</p><p>case, the aim is to find where the intensity gradient magnitude g is large enough to be taken as a reliable indicator of the edge. In the DG approach, the gradient information is estimated vectorially. There are some well-known edge operators, such as Sobel edge operator, Canny edge operator, Robbers edge operator, Prewitt edge operator and so on. In practice, Sobel gradient operator is most frequently used according to its simplicity and effectiveness. The local edge magnitude may be calculated vectorially using the nonlinear transformation [<xref ref-type="bibr" rid="scirp.95914-ref11">11</xref>]</p><p>g = g x 2 + g y 2 , (14)</p><p>In order to save computational effort, the approximate formula</p><p>g = | g x | + | g y | , (15)</p><p>could be used in practice. <xref ref-type="fig" rid="fig2">Figure 2</xref> illustrates the edge segmentation, which are obtained from input original image <xref ref-type="fig" rid="fig1">Figure 1</xref>(a) and smoothed image <xref ref-type="fig" rid="fig1">Figure 1</xref>(b). It is clear that <xref ref-type="fig" rid="fig2">Figure 2</xref>(b) shows fewer noisy in the segmentation.</p></sec><sec id="s3_3"><title>3.3. Extracting Contours</title><p>In order to reduce the computation running time and enhance the accuracy, the contours are obtained by using software OpenCV. RCD will be executed in the connected contour to find possible circles. The computational complexity is reduced from all pixels to contours.</p><p>As illustrated in <xref ref-type="fig" rid="fig3">Figure 3</xref>(a), an image with all contours from <xref ref-type="fig" rid="fig2">Figure 2</xref>(b) is generated. <xref ref-type="fig" rid="fig3">Figure 3</xref>(b) shows another more complex image with a different fiducial mark. All contours extracted from <xref ref-type="fig" rid="fig3">Figure 3</xref>(b) are shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>(c). The circle is divided into some broken edges. Every connected contour is drawn with its own particular color in images.</p></sec><sec id="s3_4"><title>3.4. The Improved RCD Algorithm</title><p>As above mentioned, we describe how to determine possible circles according to</p><p>the extracted contours. Let V denote the set of all edge contours in the image. The procedure randomly picks four pixels from each contour to make a decision whether the contour belongs to a possible circle based on the RCD algorithm. If the four pixels meet Equation (6) and Equation (7), all pixels from all contours will be collected. We continue the above process until the contour is determined as a possible circle or the global threshold T f has been reached. The procedure proceeds to next contour and the global Threshold T f is reset at the beginning.</p><p>Because the proposed algorithm samples only on the connected contours, it can overcome the interference between different objects and improve the accuracy of detection. The computational complexities are reduced and the execution-time is saved.</p></sec><sec id="s3_5"><title>3.5. The Characteristic of Circularity</title><p>The above technique can detect all possible circles around the true fiducial mark. There exists a bias problem, because of noise and nonstandard circular circle. The circularity will be calculated to determine the best matching circle.</p><p>Usually the used form features can be grouped into two categories, the contour characteristic and the regional characteristic. The contour characteristic of image is mainly aimed at the boundary of image, and the regional characteristic of image is related to the whole shape region. The circular degree could be used to describe the circle. There are four circular degree measures [<xref ref-type="bibr" rid="scirp.95914-ref12">12</xref>], such as circularity, boundary energy, density and ratio of area to average distance quadratic sum. The characteristic of circularity is easy to be realized and more suitable for engineering application. It is needed to explain that the extraction of characteristic of circularity is based on image pre-processing and edge detection.</p><p>The characteristic of circularity is defined by all boundary pixels of the region D. An image may be defined as one two-dimensional function f ( x , y ) , and the amplitude of f at any pair of coordinates ( x , y ) is called the gray level of the image at the pixel. Suppose that the image is of size N &#215; M elements. Set a pair of coordinates ( x k , y k ) of any pixel in the image. The barycentric coordinates are defined as</p><p>x &#175; : = ∑ i = 1 N ∑ j = 1 M i ⋅ f ( i , j ) ∑ i = 1 N ∑ j = 1 M f ( i , j ) ,                             y &#175; : = ∑ i = 1 N ∑ j = 1 M j ⋅ f ( i , j ) ∑ i = 1 N ∑ j = 1 M f ( i , j ) . (16)</p><p>The average distance from the regional barycentric to the boundary pixel is in the form of</p><p>μ D : = 1 K ∑ k = 0 K − 1 ‖ ( x k , y k ) − ( x &#175; , y &#175; ) ‖   , (17)</p><p>where ‖ ( x 1 , y 1 ) − ( x 2 , y 2 ) ‖ : = ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 , and the mean square deviation of distance from the regional barycentric to the boundary pixel is in the form of</p><p>δ D : = 1 K ∑ k = 0 K − 1 [ ‖ ( x k , y k ) − ( x &#175; , y &#175; ) ‖ − μ D ] 2 (18)</p><p>can be simplified to</p><p>δ D : = 1 K ∑ k = 0 K − 1 [ ( x k − x &#175; ) 2 + ( y k − y &#175; ) 2 ] 2 − μ D 2 . (19)</p><p>The calculation formula for the characteristic of circularity is defined by</p><p>C : = δ D μ D . (20)</p><p>When the regional D tends to be a circle, the characteristic of circularity C is monotonically decreasing and tends to be infinitesimal. It’s not affected by regional translation, rotation and variation of scales. It means that we can determine the position of the circle in the image by the minimum point of characteristics of circularity in local region.</p></sec><sec id="s3_6"><title>3.6. Stability, Accuracy and Time Speed</title><p>There are still some shortcomings in the standard RCD. Because the standard RCD randomly picks four edge pixels each time. The search process ended when it found the true circle or reached the number of failures T f . It means that the searching result may be quite different according to the different four starting pixels. If the staring pixels are close to the target circle, the circle may be detected rapidly. Sometimes, the start four pixels are too far from the target circle and the input image contains too many useful and useless pixels. The RCD algorithm may end without finding the true circle. In order to find possible circle rapidly, these thresholds T d , T r and T a should not be too small. Then many incorrect circles would be found.</p><p>By suppressing noise and finding of the connected contours, which contains at least a certain number of points, it will reduces the calculation time and find fewer possible circles. At last, after verifying the circularity, the real circle will be selected. So the improved RCD provides the better stability and accuracy than standard RCD. As the image grows larger and more complex, the time will become more longer. But the improved RCD will significantly reduce the time. The following experiment will be used to verify these conclusions.</p></sec></sec><sec id="s4"><title>4. Experimental Results</title><p>In this section, some experimental results are demonstrated to show the execution-time and accuracy advantages of our improved RCD algorithm, compared with standard RCD algorithm. Four original images are used to evaluate the performance of the proposed algorithm. The first three images with the same mark are shown in Figures 4(a)-(c), which have different size 131 &#215; 124 , 262 &#215; 153 and 307 &#215; 307 pixels. The last image <xref ref-type="fig" rid="fig4">Figure 4</xref>(d) has another different mark. The radius of the first mark R is 26.5 pixels and the radius of the second mark R is 36.5 pixels. <xref ref-type="table" rid="table1">Table 1</xref> describes all parameters used in our experiments. Some</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> All thresholds used in experiments</title></caption><table><tbody><thead><tr><th align="center" valign="middle" ></th><th align="center" valign="middle" >T f</th><th align="center" valign="middle" >T r</th><th align="center" valign="middle" >T a</th><th align="center" valign="middle" >T d</th><th align="center" valign="middle" >T c</th><th align="center" valign="middle" >T r L</th><th align="center" valign="middle" >T r U</th><th align="center" valign="middle" >T c c</th></tr></thead><tr><td align="center" valign="middle" >Pure RCD</td><td align="center" valign="middle" >100,000</td><td align="center" valign="middle" >0.6</td><td align="center" valign="middle" >0.25R</td><td align="center" valign="middle" >1.5</td><td align="center" valign="middle" >20</td><td align="center" valign="middle" >R − 5</td><td align="center" valign="middle" >R + 5</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >Improved RCD</td><td align="center" valign="middle" >Square of the length of contour, which is different in searching circle in each chain</td><td align="center" valign="middle" >0.6</td><td align="center" valign="middle" >0.25R</td><td align="center" valign="middle" >1.5</td><td align="center" valign="middle" >20</td><td align="center" valign="middle" >R − 5</td><td align="center" valign="middle" >R + 5</td><td align="center" valign="middle" >1</td></tr></tbody></table></table-wrap><p>additional variables are defined as following: P denotes the center pixel ( x , y ) of detected circle. R is the pre-input radius and r is the radius of detected circle. PN is the number of pixels on the contour of detected circle. C is the circularity of detected circle. Avg T (ms) represents the average running time in millisecond. T c c is the threshold of circularity.</p><sec id="s4_1"><title>4.1. Locating Mark with Standard RCD Algorithm</title><p>In this part the marks will be detected by using standard RCD algorithm. As shown in <xref ref-type="fig" rid="fig5">Figure 5</xref> there are many correct and incorrect circles in images. In <xref ref-type="fig" rid="fig5">Figure 5</xref>(c) the true mark circle is not included in the detected possible circles. There is no way to discard the incorrect circles and find the true mark. According to the threshold T c , there are twenty possible detected circles at most, which are drawn in <xref ref-type="fig" rid="fig5">Figure 5</xref>. In Tables 2-5 only ten possible circles are described.</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Ten results shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>(a)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th></tr></thead><tr><td align="center" valign="middle" >(71.039, 81.479)</td><td align="center" valign="middle" >25.911</td><td align="center" valign="middle" >404</td><td align="center" valign="middle" >(70.902, 80.576)</td><td align="center" valign="middle" >26.225</td><td align="center" valign="middle" >369</td></tr><tr><td align="center" valign="middle" >(90.787, 30.734)</td><td align="center" valign="middle" >28.790</td><td align="center" valign="middle" >133</td><td align="center" valign="middle" >(75.500, 83.700)</td><td align="center" valign="middle" >28.452</td><td align="center" valign="middle" >138</td></tr><tr><td align="center" valign="middle" >(70.930, 79.679)</td><td align="center" valign="middle" >26.190</td><td align="center" valign="middle" >302</td><td align="center" valign="middle" >(45.153, 11.418)</td><td align="center" valign="middle" >27.853</td><td align="center" valign="middle" >58</td></tr><tr><td align="center" valign="middle" >(72.391, 81.334)</td><td align="center" valign="middle" >25.750</td><td align="center" valign="middle" >383</td><td align="center" valign="middle" >(71.071, 80.071)</td><td align="center" valign="middle" >25.014</td><td align="center" valign="middle" >320.000</td></tr><tr><td align="center" valign="middle" >(71.982, 81.718)</td><td align="center" valign="middle" >25.382</td><td align="center" valign="middle" >379</td><td align="center" valign="middle" >(62.561, 16.912)</td><td align="center" valign="middle" >23.763</td><td align="center" valign="middle" >66</td></tr></tbody></table></table-wrap><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> Ten results shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>(b)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th></tr></thead><tr><td align="center" valign="middle" >(189.352, 66.432)</td><td align="center" valign="middle" >26.473</td><td align="center" valign="middle" >175</td><td align="center" valign="middle" >(157.550, 47.532)</td><td align="center" valign="middle" >26.822</td><td align="center" valign="middle" >170</td></tr><tr><td align="center" valign="middle" >(194.103, 72.685)</td><td align="center" valign="middle" >24.486</td><td align="center" valign="middle" >116</td><td align="center" valign="middle" >(195.472, 52.751)</td><td align="center" valign="middle" >24.591</td><td align="center" valign="middle" >166</td></tr><tr><td align="center" valign="middle" >(157.036, 36.878)</td><td align="center" valign="middle" >24.956</td><td align="center" valign="middle" >151</td><td align="center" valign="middle" >(223.636, 50.818)</td><td align="center" valign="middle" >26.623</td><td align="center" valign="middle" >106</td></tr><tr><td align="center" valign="middle" >(201.467, 86.570)</td><td align="center" valign="middle" >23.407</td><td align="center" valign="middle" >89</td><td align="center" valign="middle" >(185.626, 41.030)</td><td align="center" valign="middle" >23.896</td><td align="center" valign="middle" >143</td></tr><tr><td align="center" valign="middle" >(169.820, 65.472)</td><td align="center" valign="middle" >27.184</td><td align="center" valign="middle" >158</td><td align="center" valign="middle" >(206.284, 80.524)</td><td align="center" valign="middle" >27.742</td><td align="center" valign="middle" >67</td></tr><tr><td align="center" valign="middle" >(71.982, 81.718)</td><td align="center" valign="middle" >25.382</td><td align="center" valign="middle" >379</td><td align="center" valign="middle" >(62.561, 16.912)</td><td align="center" valign="middle" >23.763</td><td align="center" valign="middle" >66</td></tr></tbody></table></table-wrap><table-wrap id="table4" ><label><xref ref-type="table" rid="table4">Table 4</xref></label><caption><title> Ten results shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>(c)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th></tr></thead><tr><td align="center" valign="middle" >(34.786, 163.67)</td><td align="center" valign="middle" >27.257</td><td align="center" valign="middle" >150</td><td align="center" valign="middle" >(252.645, 48.271)</td><td align="center" valign="middle" >28.241</td><td align="center" valign="middle" >122</td></tr><tr><td align="center" valign="middle" >(177.100, 43.500)</td><td align="center" valign="middle" >28.500</td><td align="center" valign="middle" >148</td><td align="center" valign="middle" >(103.150, 122.58)</td><td align="center" valign="middle" >23.413</td><td align="center" valign="middle" >74</td></tr><tr><td align="center" valign="middle" >(69.098, 179.443)</td><td align="center" valign="middle" >25.349</td><td align="center" valign="middle" >103</td><td align="center" valign="middle" >(205.563, 55.500)</td><td align="center" valign="middle" >26.300</td><td align="center" valign="middle" >137</td></tr><tr><td align="center" valign="middle" >(145.883, 32.260)</td><td align="center" valign="middle" >27.740</td><td align="center" valign="middle" >151</td><td align="center" valign="middle" >(167.003, 42.453)</td><td align="center" valign="middle" >26.043</td><td align="center" valign="middle" >204</td></tr><tr><td align="center" valign="middle" >(216.647, 44.956)</td><td align="center" valign="middle" >25.610</td><td align="center" valign="middle" >97</td><td align="center" valign="middle" >(148.500, 13.571)</td><td align="center" valign="middle" >27.472</td><td align="center" valign="middle" >119</td></tr><tr><td align="center" valign="middle" >(71.982, 81.718)</td><td align="center" valign="middle" >25.382</td><td align="center" valign="middle" >379</td><td align="center" valign="middle" >(62.561, 16.912)</td><td align="center" valign="middle" >23.763</td><td align="center" valign="middle" >66</td></tr></tbody></table></table-wrap><table-wrap id="table5" ><label><xref ref-type="table" rid="table5">Table 5</xref></label><caption><title> Ten results shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>(d)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th></tr></thead><tr><td align="center" valign="middle" >(116.345, 107.928)</td><td align="center" valign="middle" >33.594</td><td align="center" valign="middle" >286</td><td align="center" valign="middle" >(115.135, 107.68)</td><td align="center" valign="middle" >34.296</td><td align="center" valign="middle" >318</td></tr><tr><td align="center" valign="middle" >(116.459, 106.745)</td><td align="center" valign="middle" >34.481</td><td align="center" valign="middle" >348</td><td align="center" valign="middle" >(137.832, 112.68)</td><td align="center" valign="middle" >33.834</td><td align="center" valign="middle" >102</td></tr><tr><td align="center" valign="middle" >(116.271, 107.794)</td><td align="center" valign="middle" >34.310</td><td align="center" valign="middle" >337</td><td align="center" valign="middle" >(116.256, 106.40)</td><td align="center" valign="middle" >33.951</td><td align="center" valign="middle" >309</td></tr><tr><td align="center" valign="middle" >(132.030, 109.909)</td><td align="center" valign="middle" >35.091</td><td align="center" valign="middle" >83</td><td align="center" valign="middle" >(107.256, 129.41)</td><td align="center" valign="middle" >34.519</td><td align="center" valign="middle" >101</td></tr><tr><td align="center" valign="middle" >(116.398, 101.856)</td><td align="center" valign="middle" >35.538</td><td align="center" valign="middle" >108</td><td align="center" valign="middle" >(116.355, 106.31)</td><td align="center" valign="middle" >34.913</td><td align="center" valign="middle" >325</td></tr></tbody></table></table-wrap></sec><sec id="s4_2"><title>4.2. Locating Mark with Improved RCD Algorithm</title><p>In the following experiments, the fiducial marks will be detected by our improved RCD algorithm and corresponding circularity. As illustrated in <xref ref-type="fig" rid="fig6">Figure 6</xref>, the left four images (a)-(d) denote the results, which are obtained without calculating minimal circularity. Because of unsharpness of edge, the correct and bias circles are detected, which have similar radius and position. It is difficult to determine the best true circle without additional decision condition. After calculating the minimal circularity, the true marks are located in the right four images (e)-(h). The detected possible circles are shown in Tables 6-9. Compared to the former standard RCD algorithm, the number of possible circles is fewer and the results are close to the true mark. By calculating minimal circularity, in <xref ref-type="table" rid="table6">Table 6</xref> the true circle with center pixel (71.500, 80.500) and radius 26.163 pixels is detected. In <xref ref-type="table" rid="table7">Table 7</xref> the true circle with center pixel (71.369, 81.622) and radius 27.132 pixels is detected. In <xref ref-type="table" rid="table8">Table 8</xref> the true circle with center pixel (75.601, 81.013) and</p><table-wrap id="table6" ><label><xref ref-type="table" rid="table6">Table 6</xref></label><caption><title> Results shown in <xref ref-type="fig" rid="fig6">Figure 6</xref>(a)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PB</th><th align="center" valign="middle" >c</th><th align="center" valign="middle" ></th></tr></thead><tr><td align="center" valign="middle" >(72.313, 81.737)</td><td align="center" valign="middle" >26.795</td><td align="center" valign="middle" >309</td><td align="center" valign="middle" >0.8077</td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >(71.500, 80.500)</td><td align="center" valign="middle" >26.163</td><td align="center" valign="middle" >392</td><td align="center" valign="middle" >0.1288</td><td align="center" valign="middle" >Selected As true</td></tr></tbody></table></table-wrap><table-wrap id="table7" ><label><xref ref-type="table" rid="table7">Table 7</xref></label><caption><title> Results shown in <xref ref-type="fig" rid="fig6">Figure 6</xref>(b)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th><th align="center" valign="middle" >c</th><th align="center" valign="middle" ></th></tr></thead><tr><td align="center" valign="middle" >(71.404, 82.005)</td><td align="center" valign="middle" >26.291</td><td align="center" valign="middle" >356</td><td align="center" valign="middle" >0.8077</td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >(71.369, 81.622)</td><td align="center" valign="middle" >27.132</td><td align="center" valign="middle" >253</td><td align="center" valign="middle" >0.1288</td><td align="center" valign="middle" >Selected As true</td></tr><tr><td align="center" valign="middle" >(71.194, 81.403)</td><td align="center" valign="middle" >27.016</td><td align="center" valign="middle" >272</td><td align="center" valign="middle" >0.2732</td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >(71.570, 80.779)</td><td align="center" valign="middle" >26.903</td><td align="center" valign="middle" >290</td><td align="center" valign="middle" >0.1548</td><td align="center" valign="middle" ></td></tr></tbody></table></table-wrap><table-wrap id="table8" ><label><xref ref-type="table" rid="table8">Table 8</xref></label><caption><title> Results shown in <xref ref-type="fig" rid="fig6">Figure 6</xref>(c)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th><th align="center" valign="middle" >c</th><th align="center" valign="middle" ></th></tr></thead><tr><td align="center" valign="middle" >(74.985, 81.435)</td><td align="center" valign="middle" >27.104</td><td align="center" valign="middle" >257</td><td align="center" valign="middle" >0.6047</td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >(75.601, 81.013)</td><td align="center" valign="middle" >26.951</td><td align="center" valign="middle" >253</td><td align="center" valign="middle" >0.0339</td><td align="center" valign="middle" >Selected As true</td></tr></tbody></table></table-wrap><table-wrap id="table9" ><label><xref ref-type="table" rid="table9">Table 9</xref></label><caption><title> Results shown in <xref ref-type="fig" rid="fig6">Figure 6</xref>(d)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >P</th><th align="center" valign="middle" >r</th><th align="center" valign="middle" >PN</th><th align="center" valign="middle" >c</th><th align="center" valign="middle" ></th></tr></thead><tr><td align="center" valign="middle" >(114.992, 108.471)</td><td align="center" valign="middle" >34.629</td><td align="center" valign="middle" >356</td><td align="center" valign="middle" >0.0595</td><td align="center" valign="middle" >Selected As true</td></tr><tr><td align="center" valign="middle" >(14.192, 107.192)</td><td align="center" valign="middle" >34.529</td><td align="center" valign="middle" >376</td><td align="center" valign="middle" >0.0985</td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >(116.826, 106.174)</td><td align="center" valign="middle" >34.699</td><td align="center" valign="middle" >461</td><td align="center" valign="middle" >0.2000</td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >(116.500, 108.500)</td><td align="center" valign="middle" >34.821</td><td align="center" valign="middle" >383</td><td align="center" valign="middle" >0.1547</td><td align="center" valign="middle" ></td></tr></tbody></table></table-wrap><table-wrap id="table10" ><label><xref ref-type="table" rid="table1">Table 1</xref>0</label><caption><title> Time performance comparison between standard RCD and the improved RCD in terms of milliseconds</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Original Images</th><th align="center" valign="middle" >Avg T (RCD)</th><th align="center" valign="middle" >Avg T (improved RCD)</th></tr></thead><tr><td align="center" valign="middle" ><xref ref-type="fig" rid="fig4">Figure 4</xref>(a)</td><td align="center" valign="middle" >77.8 ms</td><td align="center" valign="middle" >121 ms</td></tr><tr><td align="center" valign="middle" ><xref ref-type="fig" rid="fig4">Figure 4</xref>(b)</td><td align="center" valign="middle" >466.8 ms</td><td align="center" valign="middle" >478.2 ms</td></tr><tr><td align="center" valign="middle" ><xref ref-type="fig" rid="fig4">Figure 4</xref>(c)</td><td align="center" valign="middle" >1172.8 ms</td><td align="center" valign="middle" >710 ms</td></tr><tr><td align="center" valign="middle" ><xref ref-type="fig" rid="fig4">Figure 4</xref>(d)</td><td align="center" valign="middle" >148.2 ms</td><td align="center" valign="middle" >145 ms</td></tr></tbody></table></table-wrap><p>radius 26.951 pixels is detected. In <xref ref-type="table" rid="table9">Table 9</xref> the true circle with center pixel (114.992, 108.471) and radius 34.629 pixels is detected.</p></sec><sec id="s4_3"><title>4.3. Comparing the Execution-Time</title><p>In order to compare the execution-time, all concerned experiments are performed on the Intel i5-5200U CPU with 2.20 GHz and 8 GB RAM. The adopted operating system is MS-Windows 7 and the programming environment is VS2010. In order to accurately evaluate the execution-time, we run each image 100 times and calculate the average time in <xref ref-type="table" rid="table1">Table 1</xref>0. For locating mark in small images, the execution-time is almost the same for both algorithms. The time will be significantly reduced, when the mark is detected in a larger and complex image.</p></sec></sec><sec id="s5"><title>5. Conclusions</title><p>This paper has presented the proposed improved RCD strategy to improve the performance of execution-time and the accuracy of detection. The refined method can suppress the interference between different objects significantly. After calculating minimal circularity, the true mark will be located efficiently and accurately. The experimental results demonstrate that the proposed improved RCD improves significantly the accuracy of detection. Experimental results also demonstrate that the proposed algorithm provides a considerable execution-time improvement. The algorithm has significant execution-time superiority in large and complex image.</p><p>At the current stage, the quality of the image, such as the stability of the light source, the degree of image damage, clarity, etc., has a great influence on the calculation results. In the future, some normalization methods will be studied to reduce these interferences, such as combining with pattern recognition.</p></sec><sec id="s6"><title>Founding</title><p>This article is supported by Science and Technology Project of Fujian Provincial Department of Education under contract JAT170917 and Youth Science and Research Foundation of Chengyi College Jimei University under contract C16005.</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Liu, J.K. and Fan, Q. (2019) An Improved Randomized Circle Detection Algorithm Using in Printed Circuit Board Locating Mark. Applied Mathematics, 10, 848-861. https://doi.org/10.4236/am.2019.1010061</p></sec></body><back><ref-list><title>References</title><ref id="scirp.95914-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Gonzalez, R.C. and Woods, R.E. (1992) Digital Image Processing. Addison Wesley, New York.</mixed-citation></ref><ref id="scirp.95914-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Forsyth, D.A. (2002) Computer Vision: A Modern Approach. Prentice-Hall, New Jersey.</mixed-citation></ref><ref id="scirp.95914-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Leavers, V.F. (1993) Survey: Which Hough Transform. CVGIP: Image Understanding, 58, 250-264. https://doi.org/10.1006/ciun.1993.1041</mixed-citation></ref><ref id="scirp.95914-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Duda, R.O. and Hart, P.E. (1972) Use of the Hough Transformation to Detect Lines and Curves in Pictures. Communications of the ACM, 15, 11-15. https://doi.org/10.1145/361237.361242</mixed-citation></ref><ref id="scirp.95914-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Xu, L. and Oja, E. (1993) Randomized Hough Transform (RHT): Basic Mechanisms, Algorithms, and Computational Complexities. CVGIP: Image Understanding, 57, 131-154. https://doi.org/10.1006/ciun.1993.1009</mixed-citation></ref><ref id="scirp.95914-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Chen, T.C. and Chung, K.L. (2001) An Efficient Randomized Algorithm for Detecting Circles. Computer Vision and Image Understanding, 83, 172-191. https://doi.org/10.1006/cviu.2001.0923</mixed-citation></ref><ref id="scirp.95914-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Fischer, M.A. and Bolles, R.C. (1981) Random Sample Consensus: A Paradigm to Model Fitting with Applications to Image Analysis and Automated Cartography. Communications of the ACM, 24, 381-395. https://doi.org/10.1145/358669.358692</mixed-citation></ref><ref id="scirp.95914-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Jia, L.Q., Peng, C.Z., Liu, H.M. and Wang, Z.H. (2011) A Fast Randomized Circle Detection Algorithm. International Congress on Image and Signal Processing, 4, 835-838. https://doi.org/10.1109/CISP.2011.6100372</mixed-citation></ref><ref id="scirp.95914-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Gomes, J. and Velho, L. (1997) Image Processing for Computer Graphics. Springer-Verlag, New York. https://doi.org/10.1007/978-1-4757-2745-6</mixed-citation></ref><ref id="scirp.95914-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Gonzalez, R.C. and Woods, R.E. (2008) Digital Image Processing. Pearson Prentice Hall, New Jersey.</mixed-citation></ref><ref id="scirp.95914-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Davies, E.R. (2005) Machine Vision: Theory Algorithms Practicalities. Morgan Kaufmann, San Francisco.</mixed-citation></ref><ref id="scirp.95914-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Fan, Y. (2007) Digital Image Processing and Analysis. Beijing University of Aeronautics and Astronautics, Beijing.</mixed-citation></ref></ref-list></back></article>