Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

A combination of k-means and DBSCAN algorithm for solving the multiple generalized circle detection problem

  • 27 Accesses


Motivated by the problem of identifying rod-shaped particles (e.g. bacilliform bacterium), in this paper we consider the multiple generalized circle detection problem. We propose a method for solving this problem that is based on center-based clustering, where cluster-centers are generalized circles. An efficient algorithm is proposed which is based on a modification of the well-known k-means algorithm for generalized circles as cluster-centers. In doing so, it is extremely important to have a good initial approximation. For the purpose of recognizing detected generalized circles, a QAD-indicator is proposed. Also a new DBC-index is proposed, which is specialized for such situations. The recognition process is intitiated by searching for a good initial partition using the DBSCAN-algorithm. If QAD-indicator shows that generalized circle-cluster-center does not recognize searched generalized circle for some cluster, the procedure continues searching for corresponding initial generalized circles for these clusters using the Incremental algorithm. After that, corresponding generalized circle-cluster-centers are calculated for obtained clusters. This will happen if a data point set stems from intersected or touching generalized circles. The method is illustrated and tested on different artificial data sets coming from a number of generalized circles and real images.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13


  1. 1.

    All evaluations were done on the basis of our own Mathematica-modules, and were performed on the computer with a 2.90 GHz Intel(R) Core(TM)i7-75000 CPU with 16GB of RAM.


  1. Akinlar C, Topal C (2013) Edcircles: a real-time circle detector with a false detection control. Pattern Recognit 46:725–740

  2. Bagirov AM (2008) Modified global \(k\)-means algorithm for minimum sum-of-squares clustering problems. Pattern Recognit 41:3192–3199

  3. Bagirov AM, Ugon J, Mirzayeva H (2013) Nonsmooth nonconvex optimization approach to clusterwise linear regression problems. Eur J Oper Res 229:132–142

  4. Bezdek JC, Keller J, Krisnapuram R, Pal NR (2005) Fuzzy models and algorithms for pattern recognition and image processing. Springer, New York

  5. Birant D, Kut A (2007) ST-DBSCAN: an algorithm for clustering spatial-temporal data. Data Knowl Eng 60:208–221

  6. Brüntjen K, Späth H (1999) Incomplete total least squares. Numer Math 81:521–538

  7. Chernov N (2010) Circular and linear regression: fitting circles and lines by least squares, vol 117. Monographs on statistics and applied probability. Chapman & Hall/CRC, London

  8. Dennis JJ, Schnabel R (1996) Numerical methods for unconstrained optimization and nonlinear equations. SIAM, Philadelphia

  9. Ester M, Kriegel H, Sander J (1996) A density-based algorithm for discovering clusters in large spatial databases with noise. In: 2nd international conference on knowledge discovery and data mining (KDD-96), Portland, pp 226–231

  10. Finkel DE (2003) DIRECT optimization algorithm user guide. Center for Research in Scientific Computation. North Carolina State University. http://www4.ncsu.edu/~ctk/Finkel_Direct/DirectUserGuide_pdf.pdf

  11. Gablonsky JM (2001) Direct version 2.0. Technical report, Center for Research in Scientific Computation. North Carolina State University

  12. Grbić R, Grahovac D, Scitovski R (2016) A method for solving the multiple ellipses detection problem. Pattern Recognit 60:824–834

  13. Grbić R, Nyarko EK, Scitovski R (2013) A modification of the DIRECT method for Lipschitz global optimization for a symmetric function. J Global Optim 57:1193–1212

  14. Griffin G, Holub A, Perona P (2007) Caltech-256 object category database. Technical report, Caltech. http://authors.library.caltech.edu/7694S

  15. Hendrix EMT, Tóth BG (2010) Introduciton to nonlinear and global optimization. Springer, New York

  16. Horst R, Tuy H (1996) Global optimization: deterministic approach, 3rd edn. Springer, Berlin

  17. Jones DR, Perttunen CD, Stuckman BE (1993) Lipschitzian optimization without the Lipschitz constant. J Optim Theory Appl 79:157–181

  18. Kogan J (2007) Introduction to clustering large and high-dimensional data. Cambridge University Press, New York

  19. Morales-Esteban A, Martínez-Álvarez F, Scitovski S, Scitovski R (2014) A fast partitioning algorithm using adaptive Mahalanobis clustering with application to seismic zoning. Comput Geosci 73:132–141

  20. Nievergelt Y (1994) Total least squares: state-of-the-art regression in numerical analysis. SIAM Rev 36:258–264

  21. Paulavičius R, Žilinskas J (2014) Simplicial global optimization. Springer, Berlin

  22. Sabo K, Scitovski R (2014) Interpretation and optimization of the k-means algorithm. Appl Math 59:391–406

  23. Sabo K, Scitovski R (2015) An approach to cluster separability in a partition. Inf Sci 305:208–218

  24. Sabo K, Scitovski R, Vazler I (2013) One-dimensional center-based \(l_1\)-clustering method. Optim Lett 7:5–22

  25. Scitovski R, Marošević T (2014) Multiple circle detection based on center-based clustering. Pattern Recognit Lett 52:9–16

  26. Scitovski R, Sabo K (2019a) Application of the DIRECT algorithm to searching for an optimal \(k\)-partition of the set A and its application to the multiple circle detection problem. J Global Optim 74(1):63–77

  27. Scitovski R, Sabo K (2019b) DBSCAN-like clustering method for various data densities. Pattern Anal Appl. https://doi.org/10.1007/s10044-019-00809-z

  28. Scitovski R, Scitovski S (2013) A fast partitioning algorithm and its application to earthquake investigation. Comput Geosci 59:124–131

  29. Späth H (1981) Algorithm 48: a fast algorithm for clusterwise linear regression. Computing 29:17–181

  30. Späth H (1983) Cluster-formation und analyse. R. Oldenburg Verlag, München

  31. Theodoridis S, Koutroumbas K (2009) Pattern recognition, 4th edn. Academic Press, Burlington

  32. Thomas JCR (2011) A new clustering algorithm based on k-means using a line segment as prototype. In: Martin CS, Kim S-W (eds) Progress in pattern recognition, image analysis, computer vision, and applications. Springer, Berlin, pp 638–645

  33. Vendramin L, Campello RJGB, Hruschka ER (2009) On the comparison of relative clustering validity criteria. In: Proceedings of the SIAM international conference on data mining, SDM 2009, April 30 – May 2, 2009, Sparks, Nevada, USA SIAM, pp. 733–744

  34. Vidović I, Scitovski R (2014) Center-based clustering for line detection and application to crop rows detection. Comput Electron Agric 109:212–220

  35. Viswanath P, Babu VS (2009) Rough-DBSCAN: a fast hybrid density based clustering method for large data sets. Pattern Recognit Lett 30:1477–1488

  36. Weise T (2008) Global optimization algorithms. Theory and application. http://www.it-weise.de/projects/book.pdf

  37. Wolfram Research I (2016) Mathematica. Version 11.0 edition. Wolfram Research Inc, Champaign, IL

  38. Zhu Y, Ting KM, Carman MJ (2016) Density-ratio based clustering for discovering clusters with varying densities. Pattern Recognit 60:983–997

Download references


The author would like to thank Mrs. Katarina Moržan for significantly improving the use of English in the paper. This work was supported by the Croatian Science Foundation through research grants IP-2016-06-6545 and IP-2016-06-8350.

Author information

Correspondence to Kristian Sabo.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Scitovski, R., Sabo, K. A combination of k-means and DBSCAN algorithm for solving the multiple generalized circle detection problem. Adv Data Anal Classif (2020). https://doi.org/10.1007/s11634-020-00385-9

Download citation


  • Multiple generalized circles
  • The detection problem
  • Modified k-means
  • Incremental algorithm

Mathematics Subject Classification

  • 6207
  • 62H30
  • 68T10
  • 90C26
  • 90C27
  • 90C56
  • 91C20