Ezequiel G. Debada June 24, 2015
Turns out that my master thesis has tied my hands for the last month but thanks God, it seems that I am free again. Motivated by an article recently pub lished in Pattern recognition [1], I have some curios ity about circle detection algorithms on images and I came today with the intention of present some basics, problems and some simple examples about it. The most widely used method for circle detecting is based on Circle Hough Transform (CHT) which seems to work really well although it presents some computationeﬃciency problems. Those problems motivates a widely set of possibilities of enhancement which results in diﬀerent algorithms. Concretely the article mentioned before use something known as cir cle power theorem and power histogram, but this is something to test after learning some basics. The idea of this post is to understand the CHT method
and see how it works. A circle can by:
(x − a) ^{2} + (y − b) ^{2} = r ^{2} 
(1) 
where (a, b) is the center of the circle and r is its radius. Given an image it is wanted to ﬁgure out 

the triplets (a, b, r) which corresponds with the 
cir 
cles presented in the image and the idea is, for each
pixel in the edgeimagen, register in an accumulation matrix, the parameters of all those circles passing through the pixel. Something very typical to explain that technique is
assuming ﬁrst that we are looking for circles of known radius and then generalizing the result. Considering that the radius is known is equivalent
to reduce the subspace
(a, b, r) to (a, b) and thus, to
make possible its 2D representation. When a circle of a given Radios is being searched in an image, the accumulation matrix updating process is represented in the next gif. As it can be seen, the aforementioned process results in a subspace where the peak value shows the center of the circle found. When the radius is unknown, the process below has to be repeated for diﬀerent radius values turning the accumulating subspace in a 3d subspace. A possible representation for that is the idea of generate a cone for each 1pixel in the binary image where each level of the cone corresponds to a radius evaluated. The next ﬁgure attempts to represent that searching process. Finally, I have applied that idea over a synthetic
Figure 1: KnownR
picture shows a dynamic representation of the sub space where you can see how, when the target radius are considered, the maximum accumulation are reg istered. When one represents the maximum values regis tered in each radiositeration, and a threshold is ap plied to discern between what is considered a posi tive/negative detection, the next ﬁgure is generated. Finally, If that information is interpreted an the “detected” circles are drawn, the next results:
It is obvious that the SubSpace represented in the previous example has a simple to locate peak since the source image is ideal. Now, lets apply the same
image generated (Code available HERE). The next technique to a real image. Now, when the subspace
1
Figure 3: Foto
Figure 2: Unknown Radios
Figure 4: Peaks
representation is observed, it is clear that there is not a diﬀerentiable peak. However, when the values obtained at each subspace level are postprocessed with the normalization commented above, the next results. And ﬁnally, after applying a (subjective) suit able threshold, the main circle is detected together with other potential candidates that, in this particu lar case, could be considered false positive The con clusions I extract from this piece of work are:
• What I knew as “Hough Transform” for detect ing lines, can be generalized to detect diﬀerent shapes.
• The computational time is an obvious drawback
of this approach.
• Once the accumulation SubSpace has been ob tained, the task of deciding what is considered a positive/negative detection is not trivial.
During this brief overview about circle detection, I have experienced the computational time issue en tailed for this method. To generate the result shown below, with an image 400x400, it took around 1.5 hours, a duration absolutely out of range for the vast number of practical situations. That strongly mo tivates the development of fast implementations or event diﬀerent approach less computational expen sive. A wide set of alternative approach can be seen
2
Figure 8: Boat Detected
because of some “masterthesisrequests”, I hope to recover the publishingrate.
Figure 5: Test
[1] B. Yuan and M. Liu. Power histogram for circle detection on images. Pattern Recognition, 2015.
Figure 6: Boat SubSpace
Figure 7: Boat Peaks
in Literature. After having been out from the blog the last month
3