Cluster Computing

, Volume 20, Issue 4, pp 2845–2854 | Cite as

Effective algorithm for determining the number of clusters and its application in image segmentation

  • Jialun Pei
  • Long Zhao
  • Xiangjun DongEmail author
  • Xue Dong


The k-means algorithm is a popular clustering method for image segmentation. However, the main disadvantage of this algorithm is its dependence on the number of initial clusters. In this paper, we present an optimal criterion which can select the best segmentation result with less number of clusters. The optimal criterion overcomes the shortcoming of initialization based on the intra-class and inter-class difference. Eight digital images were employed to verify the segmentation results of the optimal criterion. Simultaneously, we have improved the traditional k-means algorithm to find the initial clustering centers efficiently. Experimental results show that the segmented images selected by the optimal criterion have sufficient stability and robustness. In addition, we verify the consistency of results by two kinds of objective assessment measures. The proposed optimal criterion can successfully display the best segmentation results precisely and efficiently so as to instead of artificial selection.


Image segmentation k-Means algorithm Clustering method Intra-class Inter-class 



This work was partly supported by National Natural Science Foundation of China (71271125, 61502260). We thank the National Natural Science Foundation of China and Natural Science Foundation of Shandong Province for funding. The authors also thank the USC-SIPI image test library in University of Southern California for providing digital images. We are grateful to every researcher who made comments to our work.

Compliance with ethical standards

Conflict of interest

The authors declare that they have no conflicts of interests.


  1. 1.
    Wang, T.N., et al.: An improved K-means clustering method for cDNA microarray image segmentation. Genet. Mol. Res. 14(3), 7771–7781 (2015)CrossRefGoogle Scholar
  2. 2.
    Jain, A.: Data clustering: 50 years beyond K-means. Pattern Recogn. Lett. 31(8), 651–666 (2010)CrossRefGoogle Scholar
  3. 3.
    Han, C.: Improved SLIC imagine segmentation algorithm based on K-means. Clust. Comput. 20(2), 1017–1023 (2017)CrossRefGoogle Scholar
  4. 4.
    Dunn, J.: A fuzzy relative of the ISODATA process and its use in detecting compact well-separated clusters. J. Cybern. 3, 32–57 (1973)CrossRefzbMATHMathSciNetGoogle Scholar
  5. 5.
    Hu, C., Xu, Z., Liu, Y., Mei, L.: Video structural description technology for the new generation video surveillance systems. Front. Comput. Sci. 9(6), 980–989 (2015)CrossRefGoogle Scholar
  6. 6.
    Xu, Z., Hu, C., Mei, L.: Video structured description technology based intelligence analysis of surveillance videos for public security applications. Multimed. Tools Appl. 75(19), 12155–12172 (2016)CrossRefGoogle Scholar
  7. 7.
    Jiang, X., Li, C., Sun, J.: A modified K-means clustering for mining of multimedia databases based on dimensionality reduction and similarity measures. Clust. Comput. 6(2), 1–8 (2017)Google Scholar
  8. 8.
    Kanungo, T., Mount, D.M., Netanyahu, N.S.: An efficient k-means clustering algorithm: analysis and implementation. IEEE Trans. Pattern Anal. Mach. Intell. 24(7), 881–892 (2002)CrossRefGoogle Scholar
  9. 9.
    Gibou, F., Fedkiw, R.: A fast hybrid k-means level set algorithm for segmentation. In: 4th Annual Hawaii International Conference on Statistics and Mathematics, pp. 281–291 (2005)Google Scholar
  10. 10.
    Ng, H.P., et al.: Masseter segmentation using an improved watershed algorithm with unsupervised classification. Comput. Biol. Med. 38(2), 171–184 (2008)CrossRefGoogle Scholar
  11. 11.
    Dhanachandra, N., Manglem, K., Chanu, Y.J.: Image segmentation using K-means clustering algorithm and subtractive clustering algorithm. Procedia Comput. Sci. 54, 764–771 (2015)CrossRefGoogle Scholar
  12. 12.
    Zhang, Y.: A survey on evaluation methods for image segmentation. Pattern Recogn. Lett. 29(8), 1335–1346 (1996)CrossRefGoogle Scholar
  13. 13.
    Liu, J., Yang, Y.H.: Multiresolution color image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 16(7), 689–700 (1994)CrossRefGoogle Scholar
  14. 14.
    Clausi, D.: K-means Iterative Fisher (KIF) unsupervised clustering algorithm applied to image texture segmentation. Pattern Recogn. Lett. 35(9), 1959–1972 (2002)CrossRefzbMATHGoogle Scholar
  15. 15.
    Ray, S., Turi, R.: Determination of number of clusters in k-means clustering and application in colour image segmentation. In: Proceedings of the 4th International Conference on Advances in Pattern Recognition and Digital Techniques, pp. 137–143 (1999)Google Scholar
  16. 16.
    Cao, F., Liang, J., Jiang, G.: An initialization method for the K-Means algorithm using neighborhood model. Comput. Math. Appl. 58(3), 474–483 (2009)CrossRefzbMATHMathSciNetGoogle Scholar
  17. 17.
    Luo, M., Ma, Y.F., Zhang, H.J.: A spatial constrained k-means approach to image segmentation. In: Proceedings of the 2003 Joint Conference of the Fourth International Conference on Information Communications and Signal Processing and the Fourth Pacific Rim Conference on Multimedia, vol. 2, pp. 738–742. IEEE (2003)Google Scholar
  18. 18.
    Bezdek, J.C., Pal, N.R.: Some new indexes of cluster validity. IEEE Trans. Syst. Man Cybern. B Cybern. 28(3), 301–315 (1998)CrossRefGoogle Scholar
  19. 19.
    Milligan, G.W., Cooper, M.C.: An examination of procedures for determining the number of clusters in a data set. Psychometrika 50(2), 159–179 (1985)CrossRefGoogle Scholar
  20. 20.
    MC Cooper, G.M., The effect of measurement error on determining the number of clusters in cluster analysis. Data, expert knowledge and decisions. Springer Berlin Heidelberg, 1988: p. 319-328Google Scholar
  21. 21.
    Pham, D.T., Dimov, S.S., Nguyen, C.D.: Selection of K in K-means clustering. Proc. Inst. Mech. Eng. C J. Mech. Eng. Sci. 219(1), 103–119 (2005)CrossRefGoogle Scholar
  22. 22.
    Weber, A.: The USC-SIPI Image Database: Version 5. Signal and Image Processing Institute (1997)Google Scholar
  23. 23.
    Lee, M.C., et al.: Fuzzy C-means clustering of magnetic resonance imaging on apparent diffusion coefficient maps for predicting nodal metastasis in head and neck cancer. Br. J. Radiol. 2016(89), 20150059 (1063)Google Scholar
  24. 24.
    Vala, M.H.J., Baxi, A.: A review on Otsu image segmentation algorithm. Int. J. Adv. Res. Comput. Eng. Technol. 2(2), 387–389 (2013)Google Scholar
  25. 25.
    Levine, M.D., Nazif, A.M.: Dynamic measurement of computer generated image segmentations. IEEE Trans. Pattern Anal. Mach. Intell. 7(2), 155–164 (1985)CrossRefGoogle Scholar
  26. 26.
    Sulaiman, S.N., Isa, N.A.M.: Adaptive fuzzy-K-means clustering algorithm for image segmentation. IEEE Trans. Consum. Electron. 56(4), 2661–2668 (2010)CrossRefGoogle Scholar
  27. 27.
    Borsotti, M., Campadelli, P., Schettini, R.: Quantitative evaluation of color image segmentation results. Pattern Recogn. Lett. 19(8), 741–747 (1998)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2017

Authors and Affiliations

  • Jialun Pei
    • 1
  • Long Zhao
    • 1
  • Xiangjun Dong
    • 1
    Email author
  • Xue Dong
    • 2
  1. 1.School of InformationQilu University of TechnologyJinanChina
  2. 2.School of Mathematical SciencesUniversity of JinanJinanChina

Personalised recommendations