Journal of Real-Time Image Processing

, Volume 10, Issue 2, pp 329–344 | Cite as

An effective real-time color quantization method based on divisive hierarchical clustering

Special Issue


Color quantization (CQ) is an important operation with many applications in graphics and image processing. Clustering algorithms have been extensively applied to this problem. In this paper, we propose a simple yet effective CQ method based on divisive hierarchical clustering. Our method utilizes the commonly used binary splitting strategy along with several carefully selected heuristics that ensure a good balance between effectiveness and efficiency. We also propose a slightly computationally expensive variant of this method that employs local optimization using the Lloyd–Max algorithm. Experiments on a diverse set of publicly available images demonstrate that the proposed method outperforms some of the most popular quantizers in the literature.


Color quantization Clustering Divisive hierarchical clustering 


  1. 1.
    Balasubramanian, R., Allebach, J.: A new approach to palette selection for color images. J. Imaging Technol. 17(6), 284–290 (1991)Google Scholar
  2. 2.
    Bentley, J.L.: Multidimensional binary search trees used for associative searching. Commun. ACM 18(9), 509–517 (1975)CrossRefMATHMathSciNetGoogle Scholar
  3. 3.
    Bing, Z., Junyi, S., Qinke, P.: An adjustable algorithm for color quantization. Pattern Recogn. Lett. 25(16), 1787–1797 (2004)CrossRefGoogle Scholar
  4. 4.
    Braudaway, G.W.: Procedure for optimum choice of a small number of colors from a large color palette for color imaging. In: Proceedings of the Electronic Imaging Conference, pp. 71–75 (1987)Google Scholar
  5. 5.
    Brun, L., Mokhtari, M.: Two high speed color quantization algorithms. In: Proceedings of the 1st International Conference on Color in Graphics and Image Processing, pp. 116–121 (2000)Google Scholar
  6. 6.
    Brun, L., Trémeau, A.: Color quantization. In: Sharma, G. (ed.) Digital Color Imaging Handbook, CRC Press, pp. 589–638 (2002)Google Scholar
  7. 7.
    Cak, S., Dizdar, E.N., Ersak, A.: A fuzzy colour quantizer for renderers. Displays 19(2), 61–65 (1998)CrossRefGoogle Scholar
  8. 8.
    Celebi M.E.: An effective color quantization method based on the competitive learning paradigm. In: Proceedings of the International Conference on Image Processing, Computer Vision, and Pattern Recognition, vol. 2, pp. 876–880 (2009)Google Scholar
  9. 9.
    Celebi, M.E.: Improving the performance of K-means for color quantization. Image Vis. Comput. 29(4), 260–271 (2011)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Celebi, M.E., Schaefer, G.: Neural gas clustering for color reduction. In: Proceedings of the International Conference on Image Processing, Computer Vision, and Pattern Recognition, pp. 429–432 (2010)Google Scholar
  11. 11.
    Chan, C.K., Ma, C.K.: A fast method of designing better codebooks for image vector quantization. IEEE Trans. Commun. 42(2/3/4):237–242 (1994)Google Scholar
  12. 12.
    Chang, C.H., Xu, P., Xiao, R., Srikanthan, T.: New adaptive color quantization method based on self-organizing maps. IEEE Trans. Neural Netw. 16(1), 237–249 (2005)CrossRefGoogle Scholar
  13. 13.
    Cheng, S., Yang, C.: Fast and novel technique for color quantization using reduction of color space dimensionality. Pattern Recogn. Lett. 22(8), 845–856 (2001)CrossRefMATHGoogle Scholar
  14. 14.
    Chung, K.L., Huang, Y.H., Wang, J.P., Cheng, M.S.: Speedup of color palette indexing in self-organization of kohonen feature map. Expert Syst. Appl. 39(3), 2427–2432 (2012)CrossRefGoogle Scholar
  15. 15.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. The MIT Press, Cambridge (2009)Google Scholar
  16. 16.
    Dekker, A.: Kohonen neural networks for optimal colour quantization. Netw.: Comput. Neural Syst. 5(3), 351–367 (1994)CrossRefMATHGoogle Scholar
  17. 17.
    Deng, Y., Manjunath, B.: Unsupervised segmentation of color-texture regions in images and video. IEEE Trans. Pattern Anal. Mach. Intell. 23(8), 800–810 (2001)CrossRefGoogle Scholar
  18. 18.
    Deng, Y., Manjunath, B., Kenney, C., Moore, M., Shin, H.: An efficient color representation for image retrieval. IEEE Trans. Image Process. 10(1), 140–147 (2001)CrossRefMATHGoogle Scholar
  19. 19.
    Equitz, W.H.: A new vector quantization clustering algorithm. IEEE Trans. Acoust. Speech Signal Process. 37(10), 1568–1575 (1989)CrossRefGoogle Scholar
  20. 20.
    Frackiewicz, M., Palus, H.: KM and KHM clustering techniques for colour image quantisation. In: Joao Manuel, R., Tavares, S., Natal Jorge, R.M. (eds.) Computational Vision and Medical Image Processing: Recent Trends. Springer, Berlin, pp. 161–174 (2011)Google Scholar
  21. 21.
    Gentile, R.S., Allebach, J.P., Walowit, E.: Quantization of color images based on uniform color spaces. J. Imaging Technol. 16(1), 11–21 (1990)Google Scholar
  22. 22.
    Gervautz, M., Purgathofer, W.: Simple method for color quantization: octree quantization. In: Magnenat-Thalmann, N., Thalmann, D. (eds.) New trends in Computer Graphics, Springer, Berlin, pp. 219–231 (1988)Google Scholar
  23. 23.
    Goldberg, N.: Colour image quantization for high resolution graphics display. Image Vis. Comput. 9(5), 303–312 (1991)CrossRefGoogle Scholar
  24. 24.
    Heckbert, P.: Color image quantization for frame buffer display. ACM SIGGRAPH Comput. Graph. 16(3), 297–307 (1982)CrossRefGoogle Scholar
  25. 25.
    Hsieh, I.S., Fan, K.C.: An adaptive clustering algorithm for color quantization. Pattern Recogn. Lett. 21(4), 337–346 (2000)CrossRefGoogle Scholar
  26. 26.
    Hu, Y.C., Lee, M.G.: (2007) K-means based color palette design scheme with the use of stable flags. J. Electron. Imaging 16(3):033003Google Scholar
  27. 27.
    Hu, Y.C., Su, B.H.: Accelerated K-means clustering algorithm for colour image quantization. Imaging Sci. J. 56(1), 29–40 (2008)CrossRefGoogle Scholar
  28. 28.
    Hu, Y.C., Su, B.H.: Accelerated pixel mapping scheme for colour image quantisation. Imaging Sci. J. 56(2), 68–78 (2008)CrossRefGoogle Scholar
  29. 29.
    Huang, Y.L., Chang, R.F.: A fast finite-state algorithm for generating RGB palettes of color quantized images. J. Inf. Sci. Eng. 20(4), 771–782 (2004)Google Scholar
  30. 30.
    Jain, A.K., Murty, M.N., Flynn, P.J.: Data clustering: A review. ACM Comput. Surv. 31(3), 264–323 (1999)CrossRefGoogle Scholar
  31. 31.
    Joy, G., Xiang, Z.: Center-cut for color image quantization. Vis. Comput. 10(1), 62–66 (1993)CrossRefGoogle Scholar
  32. 32.
    Kanjanawanishkul, K., Uyyanonvara, B.: Novel fast color reduction algorithm for time-constrained applications. J. Vis. Commun. Image Represent. 16(3), 311–332 (2005)CrossRefGoogle Scholar
  33. 33.
    Kasuga, H., Yamamoto, H., Okamoto, M.: Color quantization using the fast k-means algorithm. Syst. Comput. Jpn. 31(8), 33–40 (2000)CrossRefGoogle Scholar
  34. 34.
    Kim, D.W., Lee, K., Lee, D.: A novel initialization scheme for the fuzzy c-means algorithm for color clustering. Pattern Recogn. Lett. 25(2), 227–237 (2004)CrossRefGoogle Scholar
  35. 35.
    Kuo, C.T., Cheng, S.C.: Fusion of color edge detection and color quantization for color image watermarking using principal axes analysis. Pattern Recogn. 40(12), 3691–3704 (2007)CrossRefMATHGoogle Scholar
  36. 36.
    Lloyd, S.: Least squares quantization in PCM. IEEE Trans. Inf. Theory 28(2), 129–136 (1982)CrossRefMATHMathSciNetGoogle Scholar
  37. 37.
    Lo, K., Chan, Y., Yu, M.: Colour quantization by three-dimensional frequency diffusion. Pattern Recogn. Lett. 24(14), 2325–2334 (2003)CrossRefMATHGoogle Scholar
  38. 38.
    Max, J.: Quantizing for minimum distortion. IRE Trans. Inf. Theory 6(1), 7–12 (1960)CrossRefMathSciNetGoogle Scholar
  39. 39.
    Mojsilovic, A., Soljanin, E.: Color quantization and processing by fibonacci lattices. IEEE Trans. Image Process. 10(11), 1712–1725 (2001)CrossRefMATHMathSciNetGoogle Scholar
  40. 40.
    Orchard, M., Bouman, C.: Color quantization of images. IEEE Trans. Image Process. 39(12), 2677–2690 (1991)CrossRefGoogle Scholar
  41. 41.
    Ozdemir, D., Akarun, L.: Fuzzy algorithm for color quantization of images. Pattern Recogn. 35(8), 1785–1791 (2002)CrossRefGoogle Scholar
  42. 42.
    Papamarkos, N., Atsalakis, A., Strouthopoulos, C.: Adaptive color reduction. IEEE Trans. Syst. Man Cybern. B 32(1), 44–56 (2002)CrossRefGoogle Scholar
  43. 43.
    Rasti, J., Monadjemi, A., Vafaei, A.: Color reduction using a multi-stage kohonen self-organizing map with redundant features. Expert. Syst. Appl. 38(10), 13188–97 (2011)Google Scholar
  44. 44.
    Schaefer, G.: Intelligent approaches to colour palette design. In: Kwasnicka, H., Jain, L.C. (eds.) Innovations in Intelligent Image Analysis, Springer, Berlin, pp. 275–289 (2011)Google Scholar
  45. 45.
    Schaefer, G., Zhou, H.: Fuzzy clustering for colour reduction in images. Telecommun. Syst. 40(1-2), 17–25 (2009)CrossRefGoogle Scholar
  46. 46.
    Scheunders, P.: Comparison of clustering algorithms applied to color image quantization. Pattern Recogn. Lett. 18(11–13), 1379–1384 (1997)CrossRefGoogle Scholar
  47. 47.
    Sertel, O., Kong, J., Catalyurek, U.V., Lozanski, G., Saltz, J.H., Gurcan, M.N.: Histopathological image analysis using model-based intermediate representations and color texture: Follicular lymphoma grading. J. Signal Process. Syst. 55(1–3), 169–183 (2009)CrossRefGoogle Scholar
  48. 48.
    Sherkat, N., Allen, T., Wong, S.: Use of colour for hand-filled form analysis and recognition. Pattern Anal. Appl. 8(1), 163–180 (2005)CrossRefMathSciNetGoogle Scholar
  49. 49.
    Sirisathitkul, Y., Auwatanamongkol, S., Uyyanonvara, B.: Color image quantization using distances between adjacent colors along the color axis with highest color variance. Pattern Recogn. Lett. 25(9), 1025–1043 (2004)CrossRefGoogle Scholar
  50. 50.
    Uchiyama, T., Arbib, M.: An algorithm for competitive learning in clustering problems. Pattern Recogn. 27(10), 1415–1421 (1994)CrossRefGoogle Scholar
  51. 51.
    Velho, L., Gomez, J., Sobreiro, M.V.R.: Color image quantization by pairwise clustering. In: Proceedings of the 10th Brazilian Symposium on Computer Graphics and Image Processing, pp. 203–210 (1997)Google Scholar
  52. 52.
    Verevka, O., Buchanan, J.: Local k-means algorithm for colour image quantization. In: Proceedings of the Graphics/Vision Interface Conference, pp. 128–135 (1995)Google Scholar
  53. 53.
    Wan, S.J., Wong, S.K.M., Prusinkiewicz, P.: An algorithm for multidimensional data clustering. ACM Trans. Math. Softw. 14(2), 153–162 (1988)CrossRefGoogle Scholar
  54. 54.
    Wan, S.J., Prusinkiewicz, P., Wong, S.K.M.: Variance-based color image quantization for frame buffer display. Color Res. Appl. 15, 52–58 (1990)CrossRefGoogle Scholar
  55. 55.
    Wang, S., Cai, K., Lu, J., Liu, X., Wu, E.: Real-time coherent stylization for augmented reality. Vis. Comput. 26(6–8), 445–455 (2010)CrossRefGoogle Scholar
  56. 56.
    Ward, J.: Hierarchical grouping to optimize an objective function. J. Am. Stat. Assoc. 58(301), 236–244 (1963)CrossRefGoogle Scholar
  57. 57.
    Wen, Q., Celebi, M.E.: Hard versus Fuzzy c-means clustering for color quantization. EURASIP J. Adv. Sig. Process. 2011, 118–129 (2011)CrossRefGoogle Scholar
  58. 58.
    Wu, X.: Efficient statistical computations for optimal color quantization. In: Arvo, J. (ed.) Graphics Gems, vol. II, Academic Press, London, pp. 126–133 (1991)Google Scholar
  59. 59.
    Xiang, Z.: Color image quantization by minimizing the maximum intercluster distance. ACM Trans. Graph. 16(3), 260–276 (1997)CrossRefGoogle Scholar
  60. 60.
    Xiang, Z.: Color quantization. In: Gonzalez, T.F. (ed.) Handbook of Approximation Algorithms and Metaheuristics. Chapman & Hall/CRC, London, pp 86-1–86-17 (2007)Google Scholar
  61. 61.
    Xiang, Z., Joy, G.: Color image quantization by agglomerative clustering. IEEE Comput. Graph. Appl. 14(3), 44–48 (1994)CrossRefGoogle Scholar
  62. 62.
    Xiao, Y., Leung, C.S., Lam, P.M., Ho, T.Y.: Self-organizing map-based color palette for high-dynamic range texture compression. Neural Comput. Appl. 21(4), 639–647 (2012)CrossRefGoogle Scholar
  63. 63.
    Yang, C.K., Tsai, W.H.: Color image compression using quantization, thresholding, and edge detection techniques all based on the moment-preserving principle. Pattern Recogn. Lett. 19(2), 205–215 (1998)CrossRefGoogle Scholar
  64. 64.
    Yang, C.Y., Lin, J.C.: RWM-cut for color image quantization. Comput. Graph. 20(4), 577–588 (1996)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  1. 1.Department of Computer ScienceLouisiana State UniversityShreveportUSA
  2. 2.School of Computer Science and EngineeringUniversity of Electronic Science and Technology of ChinaChengduPeople’s Republic of China
  3. 3.Department of Computer ScienceUniversity of IllinoisSpringfieldUSA

Personalised recommendations