A multi-circle detection method based on circle properties

By leveraging the symmetry properties of circles and utilizing array storage and coordinate comparison to calculate circle parameters, the problem of excessive computation in multi-circle detection is solved, achieving stability and simplification of detection time.

CN115619843BActive Publication Date: 2026-02-03GUANGXI UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211019281.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2026-02-03
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

The probability of randomly selected 4 points being located on the same circle is low, resulting in excessive computation. Existing multi-circle detection algorithms have unstable computation time and excessive computational cost.

Method used

Based on the symmetry property of circles, four symmetrical points are found in the edge image. The coordinates of the edge points are stored using one-dimensional and two-dimensional arrays. The circle parameters are calculated by comparing the coordinates, and the true circle is determined by accumulating evidence. The array is then updated to store the true circle points.

Benefits of technology

It achieves stability in multi-circle detection time and reduces computational load, simplifies the detection process, and lowers computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115619843B_ABST
    Figure CN115619843B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-circle detection methods based on circular property, comprising: based on the symmetry of circle, find 4 symmetrical points from edge image according to coordinate comparison;Three arrays are set, and the coordinates of all edge points in edge image are stored;Based on array, calculate the circle parameter, judge whether the circle is true circle;If the circle is true circle, store the circle parameter of the circle, and update array.The algorithm proposed in the application does not need to know the number of circles in the image in advance, and the detection time is not affected by the number of circles in the image and the size of the circle;For RHT, RCD, the number of circles in the image and the size of the circle greatly affect the calculation time required for detection, and the sampling points are obtained by random sampling, which makes the detection time not stable;While the proposed algorithm obtains sampling points by comparing the coordinates of edge points, the detection time has stability, and the proposed algorithm is simple and easy to implement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of multi-circle detection, and in particular to a multi-circle detection method based on circle properties. BACKGROUND

[0002] Circle detection is very important in image analysis, especially in industrial applications such as automatic inspection of products and components, aided vectorization of drawings, object detection, etc.

[0003] Hough transform is a widely used circle detection method, and its biggest advantage is high reliability, which can still get ideal results under the conditions of noise, deformation, and even partial area loss. However, because a circle has three parameters, the calculation amount and storage requirement are very large, which is difficult to meet the requirements of practical applications.

[0004] Therefore, on the basis of Hough transform, Xu et al. proposed a random Hough transform (RHT) to overcome this problem. RHT mainly uses random sampling in image space and a many-to-one mapping mechanism from image space to parameter space. First, 3 points are randomly selected from the edge point set, and a circle parameter is calculated from the 3 points. An approximate parameter unit of the circle parameter is found in the parameter chain table. If a parameter unit that meets the requirements cannot be found in the parameter chain table, a new unit containing the circle parameter is created and inserted into the appropriate position in the parameter chain table. Otherwise, the count of the parameter unit is incremented by 1, and if the count after incrementing is not less than a pre-set threshold nt, the parameter unit determines a candidate circle. Then, evidence accumulation is used to further judge whether the candidate circle is a true circle.

[0005] For simple images, RHT can quickly detect circles in the image; but for complex images, the required calculation time and storage space of RHT will significantly increase. Therefore, some improved RHTs have been proposed to alleviate these problems.

[0006] In order to avoid the large amount of memory space and calculation time spent in parameter accumulation in RHT, Chen et al. proposed a random circle detection algorithm (RCD), which does not require the use of accumulators to store related parameter information. Four points are randomly selected from the edge point set, and the distance between any two points is greater than ε. Any 3 points can determine a circle parameter; if the other point is also on the circle corresponding to the circle parameter, evidence accumulation is performed to judge whether the circle is a true circle. RCD determines the candidate circle by selecting 4 points on the same circle, but the probability of randomly selecting 4 points on the same circle is very low, which leads to excessive calculation. Therefore, some algorithms based on RCD have been proposed to improve the detection speed.

[0007] The present application utilizes the symmetry of a circle, and proposes a multi-circle detection algorithm based on the symmetry. SUMMARY

[0008] This section is intended to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section as well as in the Abstract and the Title of the specification in order to avoid obscuring the subject matter of the present section, the Abstract and the Title. Such simplifications or omissions are not intended to limit the scope of the present application, however.

[0009] In view of the above-mentioned existing problems, the present application is proposed.

[0010] Therefore, the present application solves the technical problem that the probability of randomly selected 4 points being located on the same circle is very low, thereby causing the problem of excessive calculation amount.

[0011] To solve the above-mentioned technical problem, the present application provides the following technical solution: based on the symmetry of a circle, 4 symmetric points are found from an edge image according to coordinate comparison; three arrays are set, and the coordinates of all edge points in the edge image are stored; based on the arrays, a circle parameter is calculated to determine whether the circle is a true circle; if the circle is a true circle, the circle parameter of the circle is stored, and the arrays are updated.

[0012] As a preferred scheme of the multi-circle detection method based on the circle property, the selection of the 4 symmetric points comprises:

[0013] The 4 symmetric points are set as P(x, y), P(x, y), P(x, y) and P(x, y), and y=y, y=y, x=x and x=x, so that the 4 symmetric points are co-circular. a a a b b b c c c d d d a d b c a b c d ​​​​​​​​​​​​​​​​​​​​

[0014] As a preferred scheme of the multi-circle detection method based on circle properties, the three arrays include a one-dimensional array D, a two-dimensional integer array A, and a one-dimensional integer array S.

[0015] The one-dimensional array D is used to store the coordinates of all edge points in the edge image, and two integer members in the one-dimensional array D store the horizontal and vertical coordinates of the edge points, respectively.

[0016] The two-dimensional integer array A is used to store the horizontal coordinates of all edge points.

[0017] The one-dimensional integer array S is used to store the horizontal coordinates of the symmetry points.

[0018] As a preferred scheme of the multi-circle detection method based on circle properties, the storage method of the three arrays includes,

[0019] The storage method of the one-dimensional array D is that, for all edge points in the edge image, the coordinates of the edge points are stored in the array D in ascending order of the vertical coordinates, and for edge points with the same vertical coordinates, the coordinates are stored in ascending order of the horizontal coordinates.

[0020] The storage method of the two-dimensional integer array A is that the horizontal coordinates of all edge points with the vertical coordinate i are stored in the i-th row of the two-dimensional array A in ascending order, and after the storage is completed, the value of the next element is set to -1, that is, if the first value -1 appears in the i-th row from left to right, the subscript of the element is m, and the number of edge points with the vertical coordinate i is m; if the first element in the k-th row has a value of -1, it indicates that there is no edge point with the vertical coordinate k in the edge image.

[0021] The storage method of the one-dimensional integer array S is that, if the horizontal coordinate set of all edge points in the i-th row of the two-dimensional integer array A and the horizontal coordinate set of all edge points in the j-th row have n equal horizontal coordinate values and n≥2, the n horizontal coordinate values are stored in the one-dimensional integer array S in ascending order.

[0022] As a preferred scheme of the multi-circle detection method based on circle properties, the calculation of the circle parameters includes,

[0023] The one-dimensional integer array S is generated by comparing the horizontal coordinate sets of the i-th row and the j-th row of the two-dimensional integer array A, and the number of elements in the one-dimensional integer array S is n.

[0024] In the n elements, any two different elements can calculate a circle parameter, and a total of (n×(n-1)) / 2 circle parameters can be calculated.

[0025] As a preferred embodiment of the multi-circle detection method based on circle properties described in this invention, the calculation of the original parameters further includes:

[0026] Let the distance between any two symmetrical points be no less than a threshold t. For any two elements in a one-dimensional integer array S whose x-coordinates differ by no less than t, their x-coordinates are x0 and x1 respectively. p and x q ;

[0027] According to the x p and x q Determine the circle parameters (a, b, r);

[0028] a=(x p +x q ) / 2

[0029] b = (i + j) / 2

[0030]

[0031] Where a represents the x-coordinate of the center of the circle, b represents the y-coordinate of the center of the circle, and r represents the radius of the circle.

[0032] As a preferred embodiment of the multi-circle detection method based on circle properties described in this invention, the determination of whether the circle is a true circle includes:

[0033] Based on the number of points on the circle corresponding to the circle parameter and the threshold M min The relationship between the parameters determines whether the circle corresponding to the given circle parameter is a true circle.

[0034] If the number of points in a one-dimensional array D that lie on the circle corresponding to the circle parameter is greater than the threshold M min If the circle parameter is true, then the circle corresponding to that circle parameter is a true circle.

[0035] Otherwise, the circle corresponding to this circle parameter is a false circle.

[0036] As a preferred embodiment of the multi-circle detection method based on circle properties described in this invention, it further includes:

[0037] The method to determine whether an edge point lies on a circle is as follows:

[0038] If the distance from an edge point to the circle boundary is less than the threshold δ, then the point is located on the circle.

[0039] Otherwise, the point is not located on the circle.

[0040] As a preferred embodiment of the multi-circle detection method based on circle properties described in this invention, wherein: the threshold M min The calculations include,

[0041] M min =λ×2πr

[0042] Where λ represents a proportionality coefficient and r represents the radius of the circle.

[0043] As a preferred embodiment of the multi-circle detection method based on circle properties described in this invention, updating the array includes:

[0044] If the circle is a true circle, then the points located on the circle are removed from the one-dimensional array D, and the two-dimensional integer array A is updated using the one-dimensional array D.

[0045] The beneficial effects of this invention are as follows: This invention utilizes the symmetry property of circles to propose a multi-circle detection algorithm based on this property. This algorithm does not require prior knowledge of the number of circles in the image, and its detection time is not affected by the number or size of the circles in the image. For RHT and RCD, the number and size of the circles in the image greatly affect the computation time required for detection. Furthermore, both RHT and RCD obtain sampling points through random sampling, which makes the detection time unstable. In contrast, the proposed algorithm obtains sampling points by comparing the coordinates of edge points, making the detection time stable. At the same time, the proposed algorithm is simple and easy to implement. Attached Figure Description

[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0047] Figure 1 A schematic diagram of four symmetrical points for a multi-circle detection method based on the properties of circles, provided in one embodiment of the present invention;

[0048] Figure 2 This is a schematic diagram illustrating the relationship between symmetric points and circles in a multi-circle detection method based on circle properties, provided as an embodiment of the present invention.

[0049] Figure 3 This is a schematic diagram of the original image of a synthetic image (I) detection example provided by a multi-circle detection method based on circle properties according to an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of an image (I) detection example with 3488 noise points added, provided by a multi-circle detection method based on circle properties according to an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of the original image of a synthetic image (II) detection example provided by a multi-circle detection method based on circle properties according to an embodiment of the present invention;

[0052] Figure 6 A schematic diagram of the detection result of a synthetic image (II) detection example provided by a multi-circle detection method based on circle properties according to an embodiment of the present invention;

[0053] Figure 7 This is a schematic diagram of the original image of a multi-circle detection method based on circle properties, provided as an embodiment of the present invention.

[0054] Figure 8 This is a schematic diagram of the edge detection result of the original image, which is a practical image detection example of a multi-circle detection method based on circle properties provided in an embodiment of the present invention.

[0055] Figure 9 This is a schematic diagram of the circle detection result of the edge detection result of the original image, which is a practical image detection example of a multi-circle detection method based on circle properties provided in an embodiment of the present invention. Detailed Implementation

[0056] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0057] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0058] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0059] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.

[0060] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0061] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0062] Example 1

[0063] Reference Figures 1-2 As an embodiment of the present invention, a multi-circle detection method based on the properties of circles is provided, comprising:

[0064] S1: Based on the symmetry of the circle, four symmetrical points are found from the edge image by comparing coordinates. It should be noted that:

[0065] The selection of the four symmetrical points includes,

[0066] Let P be the four symmetrical points. a (x a y a ), P b (x b y b ), P c (x c y c ) and P d (x d y d ), and y a =y d y b =y c x a =x b, x c = x d , then the four symmetric points are concyclic.

[0067] S2: Set three arrays and store the coordinates of all edge points in the edge image. It should be noted that:

[0068] The three arrays include a one-dimensional array D, a two-dimensional integer array A, and a one-dimensional integer array S;

[0069] Use the one-dimensional array D to store the coordinates of all edge points in the edge image, and the one-dimensional array D includes two integer members, which store the horizontal and vertical coordinates of the edge points respectively;

[0070] Use the two-dimensional integer array A to store the horizontal coordinates of all edge points;

[0071] Use the one-dimensional integer array S to store the horizontal coordinates of the symmetric points.

[0072] The storage methods of the three arrays include,

[0073] The storage method of the one-dimensional array D is: for all edge points in the edge image, store the coordinates of each edge point into the array D in ascending order of the vertical coordinates. For points with the same vertical coordinate, store them in ascending order of the horizontal coordinates;

[0074] The storage method of the two-dimensional integer array A is: store the horizontal coordinates of all edge points with the vertical coordinate i (0 ≤ i < Height) into the i-th row of the two-dimensional array A in ascending order. After storage, set the value of the next element to -1. That is, if the subscript of the element with the value of -1 that first appears from left to right in the i-th row is m (0 ≤ m ≤ Width), then the number of edge points with the vertical coordinate i is m; if the value of the first element in the k-th (0 ≤ k < Height) row is -1, it means that there are no edge points with the vertical coordinate k in the edge image, where Height represents the height of the image and Width represents the width of the image;

[0075] The storage method of the one-dimensional integer array S is: if there are n equal horizontal coordinate values between the set of horizontal coordinates of all edge points in the i-th row and the set of horizontal coordinates of all edge points in the j-th row of the two-dimensional integer array A, and n ≥ 2, then store these n horizontal coordinate values into the one-dimensional integer array S in ascending order; for example, Figure 1 the 4 symmetric points P a (x a , y a ), P b (x b , y b ), P c (xc ,y c ) and P d (x d ,y d ), where y a =y d y b =y c , x a =x b x c =x d Then store x respectively b x c P is added to a one-dimensional integer array S. a (x a ,y a ), P b (x b ,y b ), P c (x c , y c ) and P d (x d ,y d ) constitutes as Figure 2 The circle shown.

[0076] S3: Based on the array, calculate the circle parameters and determine whether the circle is a true circle. It should be noted that:

[0077] Calculations of circle parameters include,

[0078] The one-dimensional integer array S is generated by comparing the x-coordinates of the i-th and j-th rows of the two-dimensional integer array A, and the number of elements in the one-dimensional integer array S is n.

[0079] Among these n elements, any two distinct elements can be used to calculate a circle parameter, that is, a total of (n×(n-1)) / 2 circle parameters can be calculated.

[0080] The calculation of the original parameters also includes,

[0081] Let the distance between any two symmetrical points be no less than a threshold t. For any two elements in a one-dimensional integer array S whose x-coordinates differ by no less than t, their x-coordinates are x0 and x1 respectively. p and x q ;

[0082] According to x p and x q Determine the circle parameters (a, b, r);

[0083] a=(x p +x q ) / 2

[0084] b = (i + j) / 2

[0085]

[0086] Where a represents the x-coordinate of the center of the circle, b represents the y-coordinate of the center of the circle, and r represents the radius of the circle.

[0087] The determination of whether a circle is a true circle includes,

[0088] Based on the number of points on the circle corresponding to the circle parameter and the threshold M min The relationship between the parameters determines whether the circle corresponding to the given circle parameter is a true circle.

[0089] If the number of points in a one-dimensional array D that lie on the circle corresponding to the circle parameter is greater than the threshold M min If the circle parameter is true, then the circle corresponding to that circle parameter is a true circle.

[0090] Otherwise, the circle corresponding to this circle parameter is a false circle.

[0091] It also includes,

[0092] The method to determine whether an edge point lies on a circle is as follows:

[0093] If the distance from an edge point to the circle boundary is less than the threshold δ, then the point is located on the circle.

[0094] Otherwise, the point is not located on the circle.

[0095] Threshold M min The calculations include,

[0096] M min =λ×2πr

[0097] Where λ represents a proportionality coefficient and r represents the radius of the circle.

[0098] S4: If the circle is a true circle, store the circle parameters and update the array. It should be noted that:

[0099] Updating the array includes,

[0100] If the circle is a true circle, then the points located on the circle are removed from the one-dimensional array D, and the two-dimensional integer array A is updated using the one-dimensional array D.

[0101] The proposed algorithm can be described as follows:

[0102] (1) According to the array storage method, initialize a one-dimensional array D with the coordinate values ​​of all edge points in the edge image, and initialize a two-dimensional integer array A with the one-dimensional array D, and let i = 0, j = i + t;

[0103] (2) Obtain the abscissa values of all edge points in the \(i\)-th row and the \(j\)-th row from the two-dimensional integer array \(A\) respectively. If there are symmetric points in these two rows, store the corresponding abscissa values of these symmetric points into the one-dimensional integer array \(S\) according to the array storage method;

[0104] (3) Calculate all the circle parameters in sequence through the one-dimensional integer array \(S\) according to the circle parameter calculation method. For each calculated circle parameter, confirm whether the circle parameter is a true circle using the determination rule of a true circle; if it is a true circle, delete the points located on this true circle from the one-dimensional array \(D\), and update the two-dimensional integer array \(A\) with the one-dimensional \(D\);

[0105] (4) \(j = j + 1\). If \(j < Height\), go to (2); otherwise, go to (5);

[0106] (5) \(i = i + 1\). If \(i < Height - t\), then \(j = i + t\), go to (2); otherwise, the detection ends.

[0107] The pseudo-code for implementing the algorithm in this article is as follows:

[0108]

[0109]

[0110] This invention utilizes the symmetric property of a circle to propose a multi-circle detection algorithm based on the symmetric property. This algorithm does not need to know the number of circles in the image in advance, and its detection time is not affected by the number of circles in the image and the size of the circles; for RHT and RCD, the number of circles in the image and the size of the circles greatly affect the calculation time required for detection; in addition, both RHT and RCD obtain sampling points through random sampling, which makes the detection time unstable; while the proposed algorithm obtains sampling points through the coordinate comparison of edge points, the detection time is stable, and at the same time the proposed algorithm is simple and easy to implement.

[0111] Embodiment 2

[0112] Refer to Figures 3-9 , which is the second embodiment of the present invention. The difference between this embodiment and the first embodiment is that it provides a verification test for the multi-circle detection method based on the circle property. To verify and explain the technical effects adopted in this method, this embodiment uses the traditional technical solution and the method of the present invention for comparative testing, and scientifically demonstrates the test results to verify the true effects of this method.

[0113] To verify the effectiveness of the proposed algorithm, a large number of synthetic and real images were used in experiments, and comparisons were made with RHT and RCD. All experimental programs were implemented in C++, and the computer used for the experiments had a Core 2 dual-core processor (2.93GHz) and 2GB of RAM. The detection termination condition for RHT and RCD was: when all circles in the image were detected, the detection ended. Considering that both RHT and RCD use random sampling, the detection time for RHT and RCD in all experiments was the average of the time taken for 50 detections.

[0114] This invention presents three experiments, in which the parameter settings of each algorithm are as follows: In Experiment 1, λ, nt, and δ in RHT are 0.7, 2, and 0.5 respectively, and λ, ε, and δ in RCD are 0.7, 8, and 0.5 respectively. In the algorithm presented in this paper, λ, δ, and t are 0.7, 0.5, and 8 respectively. In Experiments 2 and 3, λ in each algorithm is 0.6, and the other parameter values ​​are the same as in Experiment 1.

[0115] Experiment 1: To test the detection speed of the algorithm presented in this paper, a binary image of size 400 pixels × 400 pixels was constructed, as shown below. Figure 3 As shown, the graph contains 6 circles with edge points of 316, 120, 492, 180, 576, and 264 respectively. Due to intersecting circles, there are a total of 1938 edge points in the graph. Now... Figure 3 Random noise of varying degrees was added sequentially, with noise percentages of 30%, 60%, 90%, 120%, 150%, and 180%, resulting in 581, 1163, 1744, 2326, 2907, and 3488 noise points respectively. Among these, [the noise points were] directed towards... Figure 3 The image after adding 3488 noise points is as follows Figure 4 As shown in Table 1, circle detection was performed on the noisy images using RHT, RCD, and the algorithm presented in this paper. The computation time for each algorithm is shown in Table 1. All three algorithms can correctly detect the six circles in each image. The algorithm presented in this paper was used to... Figure 4 The results of 50 tests are shown in Table 2, where No. indicates Figure 4 The numbers of the six circles are as follows: a_err represents the average error between the x-coordinate of the circle center obtained from 50 detections and the true x-coordinate of the circle center; b_err represents the average error between the y-coordinate of the circle center obtained from 50 detections and the true y-coordinate of the circle center; and r_err represents the average error between the radius obtained from 50 detections and the true radius.

[0116] Table 1: Comparison of execution time of the three algorithms.

[0117] Noise ratio / % RHT / s RCD / s Invention / s 30 0.0151 0.0246 0.0132 60 0.1007 0.1612 0.0226 90 0.5059 0.4133 0.0398 120 1.7575 1.5177 0.0763 150 4.6175 3.0011 0.1398 180 11.1063 6.6367 0.2572

[0118] Table 2: The algorithm in this paper affects... Figure 4 The detection results (unit: pixels).

[0119] No. a_err b_err r_err 1 0.00 0.00 0.22 2 0.00 0.00 0.12 3 0.00 0.00 0.28 4 0.00 0.00 0.25 5 0.00 0.00 0.31 6 0.00 0.00 0.17

[0120] In Experiment 2, image 5 is a binary image of size 400 pixels × 400 pixels. This image contains three circles, some other shapes, and noise points, totaling 3399 edge points. Two of the circles are incomplete. RHT, RCD, and the algorithm presented in this paper were used to detect the circles in image 5. All three algorithms correctly detected the three circles. The time taken by RHT, RCD, and the algorithm presented in this paper were 1.3257 seconds, 1.0506 seconds, and 0.0683 seconds, respectively. The detection results of the algorithm presented in this paper are as follows: Figure 6 As shown.

[0121] In Experiment 3 Figure 7 It is an actual image with a size of 360 pixels × 300 pixels, containing 3 circles; Figure 7 After edge detection, the result is as follows Figure 8 The image shown contains 2881 edge points; RHT, RCD, and the algorithm presented in this paper are applied to... Figure 8 The computation times for circle detection were 4.6583 seconds, 2.3615 seconds, and 0.6977 seconds, respectively. All three algorithms correctly detected the three circles in the image. The detection results of the algorithm presented in this paper are as follows: Figure 9 As shown.

[0122] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A multi-circle detection method based on the properties of circles, characterized in that, include: Based on the symmetry of the circle, four symmetrical points are found from the edge image by comparing coordinates; Three arrays are set up to store the coordinates of all edge points in the edge image; Based on the array, the circle parameters are calculated to determine whether the circle is a true circle; If the circle is a true circle, then store the circle parameters and update the array; The storage methods for the three arrays include, The storage method of the one-dimensional array D is as follows: for all edge points in the edge image, store the coordinates of each edge point in array D in ascending order of their ordinates; for points with the same ordinate, store them in ascending order of their abscissas. The storage method for the two-dimensional integer array A is as follows: the x-coordinates of all edge points with y-coordinate i are stored in ascending order into the i-th row of the two-dimensional array A. After storage, the value of the next element is set to -1. That is, if the index of the first element with a value of -1 in the i-th row from left to right is m, then there are m edge points with y-coordinate i. If the value of the first element in the k-th row is -1, it means that there are no edge points with y-coordinate k in the edge image. The storage method for a one-dimensional integer array S is as follows: if the set of x-coordinates of all edge points in the i-th row of a two-dimensional integer array A and the set of x-coordinates of all edge points in the j-th row have n equal x-coordinate values ​​and n≥2, then these n x-coordinate values ​​are stored in the one-dimensional integer array S in ascending order.

2. The multi-circle detection method based on circle properties as described in claim 1, characterized in that: The selection of the four symmetrical points includes, Let the four symmetrical points be P. a (x a y a ), P b (x b y b ), P c (x c y c ) and P d (x d y d ), and y a =y d y b =y c x a =x b x c =x d Therefore, the four symmetrical points are concyclic.

3. The multi-circle detection method based on circle properties as described in claim 1 or 2, characterized in that: The three arrays include a one-dimensional array D, a two-dimensional integer array A, and a one-dimensional integer array S; The coordinates of all edge points in the edge image are stored using the one-dimensional array D, and the one-dimensional array D includes two integer members, which store the horizontal and vertical coordinates of the edge points respectively. The two-dimensional integer array A is used to store the x-coordinates of all edge points; The abscissa of the symmetrical point is stored using the one-dimensional integer array S.

4. The multi-circle detection method based on circle properties as described in claim 3, characterized in that: The calculation of the circle parameters includes, The one-dimensional integer array S is generated by comparing the x-coordinates of the i-th and j-th rows of the two-dimensional integer array A, and the number of elements in the one-dimensional integer array S is n. Among these n elements, any two distinct elements can be used to calculate a circle parameter, that is, a total of (n×(n-1)) / 2 circle parameters can be calculated.

5. The multi-circle detection method based on circle properties as described in claim 4, characterized in that: The calculation of the circle parameters also includes, Let the distance between any two symmetrical points be no less than a threshold t. For any two elements in a one-dimensional integer array S whose x-coordinates differ by no less than t, their x-coordinates are x0 and x1 respectively. p and x q ; According to the x p and x q Determine the circle parameters (a, b, r); a=(x p +x q ) / 2 b = (i + j) / 2 Where a represents the x-coordinate of the center of the circle, b represents the y-coordinate of the center of the circle, and r represents the radius of the circle.

6. The multi-circle detection method based on circle properties as described in claim 5, characterized in that: The determination of whether a circle is a true circle includes, Based on the number of points on the circle corresponding to the circle parameter and the threshold M min The relationship between the parameters determines whether the circle corresponding to the given circle parameter is a true circle. If the number of points in a one-dimensional array D that lie on the circle corresponding to the circle parameter is greater than the threshold M min If the circle parameter is true, then the circle corresponding to that circle parameter is a true circle. Otherwise, the circle corresponding to this circle parameter is a false circle.

7. The multi-circle detection method based on circle properties as described in claim 6, characterized in that: It also includes, The method to determine whether an edge point lies on a circle is as follows: If the distance from an edge point to the circle boundary is less than the threshold δ, then the point is located on the circle. Otherwise, the point is not located on the circle.

8. The multi-circle detection method based on circle properties as described in claim 6 or 7, characterized in that: The threshold M min The calculations include, M min =λ×2πr Where λ represents a proportionality coefficient and r represents the radius of the circle.

9. The multi-circle detection method based on circle properties as described in claim 8, characterized in that: Updating the array includes, If the circle is a true circle, then the points located on the circle are removed from the one-dimensional array D, and the two-dimensional integer array A is updated using the one-dimensional array D.

Citation Information

Patent Citations

  • Method for detecting accurate real-time curve in complex screen

    CN103268611A

  • Method for improving speed of randomized circle detection in specific condition

    CN106339711A