The Incremental Online K Means Clustering Algorithm and Its Application To Color Quantization
The Incremental Online K Means Clustering Algorithm and Its Application To Color Quantization
by
Amber Abernathy
Master of Science
in
Computer Science
Conway, Arkansas
May 2022
© 2022 Amber Abernathy
ii
ACKNOWLEDGEMENT
First and foremost, I would like to express my sincerest thanks to my thesis and
research advisor Dr. Emre Celebi, professor and chairperson of the Department of
Computer Science and Engineering at the University of Central Arkansas. This research
would not have been possible without his dedication, leadership, and support.
I would also like to thank the members of my thesis committee, Dr. Yu Sun and
Dr. Sinan Kockara, for their support and positive experiences throughout my entire
Computer Science and Engineering for their time, influence, and support. Everyone has
played a major role in both influencing my future and education, all while engraving
positive memories along the way. Thank you all for all you do.
iii
VITA
Amber Abernathy was raised in Morley, Missouri before moving to Little Rock,
Arkansas at the age of 5. In 2017, she graduated as class Valedictorian from Mayflower
High School. After high school, she attended the University of Central Arkansas and
graduated in May 2021 with a Bachelor of Science in Computer Science and minors in
iv
ABSTRACT
clustering algorithms, both of hierarchical and partitional types, have been applied to the
CQ problem since the 1980s. In general, hierarchical CQ algorithms are faster, whereas
partitional ones produce better results provided that they are initialized properly. In this
public test images demonstrate that the proposed algorithm is significantly faster than two
popular batch k-means algorithms while yielding nearly identical results. In addition,
unlike MacQueen’s original algorithm, the proposed algorithm is both deterministic and
v
TABLE OF CONTENTS
VITA .................................................................................................................................. iv
ABSTRACT........................................................................................................................ v
REFERENCES ................................................................................................................. 18
vi
LIST OF TABLES
vii
LIST OF FIGURES
viii
CHAPTER 1 INTRODUCTION
True-color images have become truly ubiquitous over the past two decades. A
typical true-color image may contain hundreds of thousands of colors, which makes it
challenging to display, store, transmit, process, and analyze such an image. Color
Quantization (CQ) is a common image processing operation, which aims to reduce the
CQ consists of two main phases: palette design (the selection of a small set of
colors that represents the colors in the input image) and pixel mapping (the assignment of
each pixel in the input image to one of the palette colors). Since pixel mapping can be
accomplished using a straightforward linear-time algorithm that maps each input pixel to
the nearest palette color, most CQ studies deal with the computationally difficult palette
design phase.
Many clustering algorithms, both of hierarchical and partitional types, have been
applied to the palette design problem since the 1980s (Brun & Tremeau 2002). A
hierarchical algorithm partitions the input data set into a set of nested clusters that are
partitional algorithm, on the other hand, partitions the input data set into a number of
mutually exclusive subsets. These algorithms find all clusters simultaneously without
1
imposing a hierarchical structure (Jain, Murty, & Flynn 1999). In the context of CQ,
hierarchical design algorithms are generally faster, whereas partitional ones often
produce better results as long that they are initialized properly. Classic hierarchical CQ
algorithms include median-cut (Heckbert 1982), octree (Gervautz & Purgathofer 1988),
Wan et al.’s algorithm (Wan, Prusinkiewicz, & Wong 1990), Wu’s algorithm (Wu 1991),
Orchard & Bouman’s algorithm (Orchard & Bouman 1991), center-cut (Joy & Xiang
1993), and rwm cut (Yang & Lin 1996). Partitional algorithms adapted to CQ include
competitive learning (Celebi, Hwang, & Wen 2014), fuzzy c-means (Schaefer & Zhou
2009; Wen & Celebi 2011), k-means (Hu & Lee 2007; Hu & Su 2008) (Celebi 2009;
Celebi 2011; Valenzuela, Celebi, & Schaefer 2018; Thompson, Celebi, & Buck 2020), k-
harmonic means (Frackiewicz & Palus 2011), maximin (Xiang 1997), rough c-means
(Schaefer, HU, Zhou, Peters, & Hassanien 2012), and self-organizing maps (Dekker
1994; Pei & Lo 1998; Chang, Xu, Xiao, & Srikanthan 2005; Wang, Lee, & Hsieh 2007;
formulation of the celebrated k-means algorithm. The remainder of the thesis is organized
as follows. Chapter 2 describes three known variants of the k-means clustering algorithm
and the proposed fourth variant. Chapter 3 presents the experimental results and
2
CHAPTER 2 K-MEANS AND ITS VARIANTS
This chapter describes four variants of the k-means clustering algorithm: batch k-
means, incremental batch k-means, online k-means, and incremental online k-means. The
first three algorithms are known, and the last one is new.
Batch K-Means
Batch k-means (BKM) (Forgy 1965), also known as Lloyd’s algorithm (Lloyd
1982), is the most widely used partitional clustering algorithm (Wu, Kumar, Quinlan, et
cluster 𝑃 is represented by a center 𝒄 . The algorithm starts with an arbitrary set of initial
two steps: assignment and update. In the assignment step, each data point is assigned to
the nearest center. In the update step, each center is updated to be the centroid of the data
points assigned to it. Each iteration can be shown to either decrease the Sum of Squared
squared Euclidean ℓ dissimilarity between data point 𝐱 and the nearest center in 𝐶, or
leave it unchanged (at which point the algorithm is considered to have converged).
Banerjee et al. (Banerjee, Merugu, Dhillon, Ghosh, & Lafferty 2005) proved that the
optimal center of a cluster is given by the centroid of the cluster only for Bregman
3
Let 𝐼 be the input image in a CQ application. The data set 𝑋 then represents the
the RGB color model), and 𝐾 is the number of desired colors in the output (quantized)
Step Description
points assigned to 𝐜 .
memberships of the data points stabilize (or, equivalently, when the cluster centers
stabilize). Step (1), initialization, is the most important step as the algorithm is highly
sensitive to the initialization of the centers. Adverse effects of poor initialization include
empty clusters, slower convergence, and a higher chance of getting stuck in a bad local
optimum (Celebi, Kingravi, & Vela 2013). Although it has a linear time complexity (in
N, D, and K), BKM is computationally demanding to do its iterative nature (Celebi 2011).
In general, the number of iterations cannot be predicted in advance and depends on the
4
number, dimensionality, and distribution of the data points as well as the number of
clusters sought.
Incremental batch k-means (IBKM) (Linde, Buzo, & Gray 1980) is a variant of BKM
that features a built-in initialization scheme. The original BKM algorithm assumes that
the algorithm is supplied with appropriate initial centers. IBKM, on the other hand, starts
with a single center and incrementally adds new centers until the number of centers
Step Description
and 𝐜 .
set 𝑋 is clustered.)
splitting each of the existing centers into two. When a center 𝐜 is split, the left child
inherits its parent’s attributes (i.e., 𝐜 𝐜 ), whereas the right child becomes a
5
vector of small positive ℓ norm). Preserving the parent’s attributes in the next iteration
ensures that the SSE will not increase (Gray 1984). Note that in the IBKM pseudocode
above, for simplicity, we assumed that 𝐾 is a power of two. If this is not the case, we
perform ⌊log 𝐾⌋ iterations as described above and then perform one last iteration in
While BKM is well known in virtually all scientific disciplines where clustering is
employed (Celebi 2014), IBKM appears to be known primarily in the vector quantization
Online K-Means
Mac-Queen’s k-means, is an online variant of BKM. The two algorithms differ in how
often and how they update the cluster centers. BKM updates all 𝐾 cluster centers at once
after all data points are assigned to their respective nearest centers. OKM, on the other
hand, updates a single cluster center immediately after a data point is assigned to it. OKM
is considered a noisy version of BKM where the noise aids the algorithm in escaping bad
local optima (Bottou 1995). The pseudocode for OKM is given in Table 3.
6
Table 3. OKM Algorithm
Step Description
assigned to center 𝐜 .
4 Assign 𝐱 to the nearest center, say 𝐜 (refer to step (2) in the BKM
pseudocode).
Note that, unlike BKM, OKM traverses the data points in random order, which
aims to reduce OKM’s sensitivity to the order in which the data points are processed.
Studies have shown that for online learning algorithms like OKM, random traversal is
preferable to cyclical traversal, which is used in BKM (Bermejo & Cabestany 2002). This
is because cyclical presentation may bias an online learning algorithm, especially when
learning scheme for discovering general features that can be used to classify a set of
patterns (Grossberg 1987; Rumelhart & Zipser 1985). In a basic competitive learning
algorithm, given a set of randomly distributed units, the units compete for assignment to a
given subset of inputs. After the presentation of each input, the closest unit is deemed the
7
winner and moved closer to the input. Hard competitive learning, also known as winner-
take-all learning, consists of algorithms where each input determines the adaptations of a
single winning unit. OKM is an instance of hard competitive learning, as only the
nearest center (winning unit) with respect to the ℓ dissimilarity (refer to step (2) in the
𝒄 𝒄 𝑟 𝑡 𝑥 𝒄 , (1)
where 𝑟 ∈ 0,1 is the learning rate, which is chosen to satisfy the Robbins–Monro
𝑙𝑖𝑚 𝑟 𝑡 0, (2a)
→
𝑟 𝑡 ∞, (2b)
𝑟 𝑡 ∞. (2c)
These conditions ensure that the learning rate decreases at a rate that is fast
enough to suppress the noise, but not too fast to avoid premature convergence. By
𝐜 𝑟 𝑡 𝐱 1 𝑟 𝑡 𝐜 , (3)
which shows that new center 𝐜 is a convex combination of the old center 𝐜 and the
input data point 𝐱 . Under mild regularity conditions, OKM converges almost surely to
8
The original OKM algorithm employs a harmonic learning rate 𝑟 𝑡 1/𝑡,
rate 𝑟 𝑡 𝑡 . In theory, the harmonic rate decays too rapidly, while the
hyperharmonic rate with 𝑝 0.5 gives much better results (Darken & Moody 1990; Wu
OKM scans through the input image only once, as opposed to BKM, which scans
through the image multiple times. In our earlier work (Thompson, Celebi, & Buck 2020),
we showed that OKM obtains very similar results to BKM while being 41 to 300 times
faster. Unlike BKM, however, OKM has an element of randomness in it (refer to step (3)
in the OKM pseudocode). In our earlier work (Thompson, Celebi, & Buck 2020), we
sampled the input image quasirandomly using a low-discrepancy sequence (Bratley 1988)
and showed that such a sampling is not only deterministic, but also gives nearly identical
quasirandom sampling approach (refer to Thompson, Celebi, & Buck 2020 for details.)
and coined the term “k-means” in the mid-1960s. However, in time, “k-means” came to
refer to the BKM algorithm rather than MacQueen’s OKM algorithm. In fact, a vast
is identical to IBKM with two exceptions. First, IOKM uses OKM (rather than BKM) to
refine the newly generated centers in each iteration. Second, in IOKM we can safely take
‖𝝐‖ 0, while in IBKM ‖𝝐‖ must be a small positive number. Otherwise, if we set
9
‖𝝐‖ 0 in IBKM, the left and right children will be identical and the subsequent BKM
run will not be able to separate these identical centers, resulting in an empty cluster.
Following our earlier work (Thompson, Celebi, & Buck 2020), we implement
OKM as a one-pass algorithm. In other words, we terminate the iterations once the
represent the presented data point. Thus, OKM performs on the order of 𝑁𝐾
computations. IOKM, on the other hand, performs log 𝐾 passes over the input image,
roughly 2𝑁𝐾 computations. Consequently, for reasons of fairness, we terminate each call
As mentioned earlier, BKM is very popular in the clustering literature, whereas its
Despite its significant computational efficiency over BKM, however, OKM does not
seem to be as widely used as its batch counterpart. Finally, to the best of our knowledge,
IOKM, which is the incremental version of OKM, has not been investigated in the
literature.
Recall that both BKM and OKM include an initialization step wherein the initial
cluster centers are determined. It is well known that initialization is especially important
for a batch learning algorithm like BKM (Celebi 2013; Celebi 2015). In this study, we
address the initialization problem for BKM and OKM using the maximin algorithm
10
(Gonzalez 1985). This algorithm begins by taking an arbitrary data point to be the first
mention that Feder and Green (Feder & Greene 1988) described an elaborate
optimal under the algebraic computation tree model. However, this time-optimal
The maximin algorithm calls for an arbitrary selection of the first center. Selecting
this center uniformly at random from 𝑋 is customary, but this makes the otherwise
first center as the centroid of 𝑋, which can be computed as 𝑋 is read from the disk. The
11
Table 4. Maximin Algorithm
Step Description
𝐱 to its nearest center. Set the index of the next center to be found as
An interesting and little known property of maximin is that it selects one and only
one center from each of the 𝐾 clusters provided that 𝑋 contains compact and separated
clusters, i.e., each of the possible intra-cluster distances is less than each of the possible
inter-cluster distances (Hathaway, Bezdek, & Huband 2006). In other words, maximin is
12
CHAPTER 3 EXPERIMENTAL RESULTS AND DISCUSSION
The proposed IOKM algorithm was tested on eight popular 24-bit test images
shown in Fig. 1. Of these images, Baboon (512 × 512), Lenna (512 × 512), and Peppers
Motocross (768 × 512) and Parrots (768 × 512) are from the Kodak Lossless True Color
Image Suite (http://r0k.us/graphics/kodak/); and Goldhill (720 × 576), Fish (300 × 200),
and Pills (800 × 519) are by Lee Crocker, Luiz Velho, and Karel de Gendre, respectively.
𝑀𝑆𝐸 𝐼, 𝐼 ∑ ∑ 𝐼 𝑟, 𝑐 𝐼 𝑟, 𝑐 , (5)
where 𝐼 and 𝐼 respectively denote the 𝐻 𝑊 original input and quantized output
split, the left child inherits its parent’s attributes (i.e., 𝐜 𝐜 ), while the right child
with 𝜖 ∈ 0.0, 0.255, 1.02, 4.08, 16.32 revealed that as long as 𝜖 is small, its precise
value makes little difference in the MSE obtained. Thus, we used 𝜖 0 for IOKM and
𝜖 0.255 for IBKM (recall that BKM, which is repeatedly called by IBKM, generates
13
Comparison Against Other CQ Algorithms
The proposed IOKM algorithm (and the other k-means variants, i.e., BKM,
(POP) (Heckbert 1982), median-cut (MC) (Heckbert 1982), modified popularity (MPOP)
algorithm (WAN) (Wan, Wong, & Prusinkiewicz 1990), greedy orthogonal bi-
partitioning (WU) (Wu 1991), center-cut (CC) (Joy 1993), self-organizing map (SOM)
(Dekker 1994), radius-weighted mean-cut (RWM) (Yang & Lin 1996), modified
maximin (MMM) (Xiang 1997), split and merge (SAM) (Brun & Mokhtari 2000),
variance-cut (VC) (Celebi, Wen, & Hwang 2015), and variance-cut with Lloyd iterations
Among these, SOM, MMM, VCL, BKM, IBKM, OKM, and IOKM are
Brief descriptions of these algorithms (except for IBKM, OKM, and IOKM,
which are described in this thesis) can be found in our previous work (Celebi
2009; Celebi 2011; Celebi, Hwang, & Wen 2014; Celebi, Wen, & Hwang 2015).
measure, with the lowest/best values shown in bold. Table 2, on the other hand, compares
the efficiency of the four k-means based CQ algorithms on three of the test images:
Baboon, Lenna, and Peppers. These images were chosen as they have identical
dimensions (512 × 512), while the other images have varying dimensions. The efficiency
independent runs). Each of the remaining CQ algorithms was excluded from the
14
efficiency comparisons for one of two reasons: 1) The algorithm is a hierarchical one that
trades effectiveness for efficiency, or 2) The algorithm is a partitional one that is neither
effective nor efficient (compared to the four k-means variants). All algorithms were
implemented in the C/C++ language and executed on a 1.8GHz Intel Core i7-8665U
As expected, the partitional algorithms are generally more effective, than the
hierarchical ones.
Overall, IBKM is the most effective algorithm as it often attains the best MSE,
with IOKM usually attaining the second best MSE. IBKM often gives a
slightly lower MSE than IOKM, but this comes at a very high computational
cost (IOKM is 42 to 385 times faster than IBKM.) The superiority of IOKM
can be attributed to the online nature of IOKM and its integrated initialization
scheme.
OKM is more efficient than IOKM for 𝐾 128. At 𝐾 128, the two
Compared to OKM, IOKM does not require initialization and attains better
MSE values, in general. On average, the two algorithms have about the same
efficiency.
The execution time of BKM varies widely among the three images Baboon,
Lenna, and Peppers (all of which have the same number of pixels) for a given
15
with BKM took approximately 14.5s, while using the same algorithm to
cluster Peppers took approximately 6.5s. On the other hand, for 𝐾 128,
Peppers took longer to cluster with an approximate time of 34s. The execution
these batch algorithms, the online algorithms exhibit a very steady trend. In
other words, for any given K value, OKM and IOKM take nearly constant
Figures 2, 4, and 6 show sample quantization results for close-up sections of the
Baboon, Peppers, and Pills images, respectively. Figures 3, 5, and 7 show the full-scale
error images for the respective images. Given a pair of original and quantized images, the
factor of four and then negating them for better visualization. It can be seen that the
proposed IOKM algorithm performs remarkably well, resulting in clean images with low
distortion. Combined with the MSE figures given in Table 1, these error images
demonstrate that the proposed algorithm and IBKM produce very similar results.
16
CHAPTER 4 CONCLUSIONS AND FUTURE WORK
online k-means (OKM) algorithm, but unlike OKM and many other partitional clustering
algorithms, IOKM does not require an explicit center initialization. In addition, unlike
OKM, IOKM is deterministic thanks to its quasirandom sampling scheme. This means
that one needs to run IOKM only once to obtain a high-quality quantization. The
performance of IOKM was examined on a diverse set of public test images and compared
that IOKM is competitive with the best algorithm (incremental batch k-means, IBKM) in
terms of effectiveness, while being one to two orders of magnitude faster. IOKM is easy
to implement and very efficient (requiring about a third of a second to quantize a 512 ×
512 image to 256 colors). IOKM is also easy to use because it requires no user-defined
parameters other than 𝐾 (the number of output colors). Apart from the quasirandom
sampling part, nothing in the proposed IOKM algorithm makes it specific to image data.
clustering problems.
17
REFERENCES
Banerjee, A., Merugu, S., Dhillon, I. S., Ghosh, J., & Lafferty, J. (2005). Clustering with
Bregman divergences. Journal of machine learning research, 6(10), 1705–1749.
Bermejo, S., & Cabestany, J. (2002). The effect of finite sample size on on-line k-
means. Neurocomputing, 48(1–4), 511–539. doi: 10.1016/S0925-2312(01)00626-
9
Bottou, L., & Bengio, Y. (1995). Convergence properties of the k-means algorithms.
In Advances in neural information processing systems. 585–592.
Bottou, L. (1998). Online Learning and Stochastic Approximations. In D. Saad (Ed.), On-
Line Learning in Neural Networks, Cambridge University Press, 9–42.
Bratley, P., Fox, B. L. (1988). Algorithm 659: Implementing Sobol’s Quasirandom
Sequence Generator. ACM transactions on Mathematical Software, 14(1) 88–100.
doi: 10.1145/42288.214372
Braudaway, G. W. (1987). Procedure for Optimum Choice of a Small Number of Colors
from a Large Color Palette for Color Imaging. Proceedings of the Electronic
Imaging Conference, 71–75.
Bregman, L. M. (1967). The Relaxation Method of Finding the Common Point of
Convex Sets and its Application to the Solution of Problems in Convex
Programming. USSR computational mathematics and mathematical physics, 7(3),
200–217. doi: 10.1016/0041-5553(67)90040-7
Brun, L., & Mokhtari, M. (2000). Two High Speed Color Quantization Algorithms.
Proceedings of the 1st International Conference on Color in Graphics and Image
Processing, 116–121.
Brun, L., & Trémeau, A. (2003). Color Quantization. Digital Color Imaging Handbook
(G. Sharma, Ed.), CRC Press, 589–638. doi: 10.1201/9781420041484
Celebi, M. E. (2009). Fast Color Quantization Using Weighted Sort-Means Clustering.
Journal of the Optical Society of America A, 26(11), 2434–2443. doi:
10.1364/JOSAA.26.002434
Celebi, M. E. (2011). Improving the Performance of K-Means for Color Quantization.
Image and Vision Computing, 29(1), 260–271. doi: 10.1016/j.imavis.2010.10.002
18
Celebi, M. E., Kingravi, H., & Vela, P. A. (2013). A Comparative Study of Efficient
Initialization Methods for the K-Means Clustering Algorithm. Expert Systems
with Applications, 40(1), 200–210. doi: 10.1016/j.eswa.2012.07.021
Celebi, M. E., Hwang, S., & Wen, Q. (2014). Color Quantization Using the Adaptive
Distributing Units Algorithm. Imaging Science Journal, 62(2), 80–91. doi:
10.1179/1743131X13Y.0000000059
Celebi, M. E.(ed.) (2014) Partitional Clustering Algorithms. Springer. doi: 10.1007/978-
3-319-09259-1
Celebi, M.E., Wen, Q. & Hwang, S. (2015). An Effective Real-Time Color Quantization
Method Based On Divisive Hierarchical Clustering, Journal of Real- Time Image
Processing, 10( 2), 329–344. doi: 10.1007/s11554-012-0291-4
Chang, C. H., Xu, P., Xiao, R., & Srikanthan, T. (2005). New adaptive color quantization
method based on self-organizing maps. IEEE transactions on neural
networks, 16(1), 237–249. doi: 10.1109/TNN.2004.836543
Darken, C., Moody, J. (1990) Fast adaptive K-means clustering: some empirical results.
Proceedings of the 1990 International Joint Conference on Neural Networks. 233–
238. doi: 10.1109/IJCNN.1990.137720
Dekker, A. (1994). Kohonen Neural Networks for Optimal Colour Quantization.
Network: Computation in Neural Systems, 5(3), 351–367. doi: 10.1088/0954-
898X/5/3/003
Feder, T., Greene, D. (1988). Optimal Algorithms for Approximate Clustering, in:
Proceedings of the 20th Annual ACM Symposium on Theory of Computing, 434–
444. doi: 10.1145/62212
Forgy, E. (1965) Cluster Analysis of Multivariate Data: Efficiency versus Interpretability
of Classifications. Biometrics, 21, 768–780.
Frackiewicz, M., & Palus, H. (2011). KM and KHM Clustering Techniques for Colour
Image Quantisation. In J. M. R. S. Tavares, R. N. Jorge (Eds.), Computational
Vision and Medical Image Processing: Recent Trends, 161–174. Springer,
Dordrecht. doi: 10.1007/978-94-007-0011-6_9
19
Gervautz, M., & Purgathofer, W. (1988). A Simple Method for Color Quantization:
Octree Quantization. In N. Magnenat-Thalmann & D. Thalmann (Eds.), New
Trends in Computer Graphics, 219–231. Berlin, Germany: Springer. doi:
10.1007/978-3-642-83492-9_20
Gonzalez, T. (1985). Clustering to Minimize the Maximum Intercluster Distance.
Theoretical Computer Science 38(2–3), 293–306. doi: 10.1016/0304-
3975(85)90224-5
Grossberg, S. (1987). Competitive learning: From interactive activation to adaptive
resonance. Cognitive science, 11(1), 23–63. doi: 10.1016/S0364-0213(87)80025-
3
Hathaway R.J., Bezdek J.C., Huband J.M. (2006). Maximin Initialization for Cluster
Analysis, in: Proceedings of the 11th Iberoamerican Congress in Pattern
Recognition, Springer, 14–26. doi: 10.1007/11892755_2
Heckbert, P. (1982). Color Image Quantization for Frame Buffer Display. ACM
SIGGRAPH Computer Graphics, 16(3), 297–307. doi: 10.1145/965145.801294
Hu, Y., & Lee, M. G. (2007). K-means-based color palette design scheme with the use of
stable flags. Journal of Electronic Imaging, 16(3), 033003. doi:
10.1117/1.2762241
Hu, Y. C., & Su, B. H. (2008). Accelerated k-means clustering algorithm for colour
image quantization. The Imaging Science Journal, 56(1), 29–40. doi:
10.1179/174313107X176298
Jain, A. K., Murty, M. N., & Flynn, P. J. (1999). ACM Computing Surveys (CSUR).
Data Clustering: A Review 31(3), 264–323. doi: 10.1145/331499.331504
Joy, G., & Xiang, Z. (1993). Center-Cut for Color Image Quantization. Visual
Computing, 10(1), 62–66. doi: 10.1007/BF01905532
Linde Y., Buzo A., & Gray, R. (1980) An Algorithm for Vector Quantizer Design. IEEE
Transactions on Communications, 28(1), 84–95. doi:
10.1109/TCOM.1980.1094577
Lloyd, S. (1982). Least Squares Quantization in PCM. IEEE Transactions on Information
Theory, 28(2), 129–136. doi: 10.1109/TIT.1982.1056489
20
MacQueen, J. (1967) Some Methods for Classification and Analysis of Multivariate
Observations. Proceedings of the 5th Berkeley Symposium on Mathematical
Statistics and Probability 281–297. doi: 10.1.1.308.8619
Orchard, M. T., & Bouman, C. A. (1991). Color quantization of images. IEEE
transactions on signal processing, 39(12), 2677–2690. doi: 10.1109/78.107417
Pei, S. C., & Lo, Y. S. (1998). Color image compression and limited display using self-
organization Kohonen map. IEEE Transactions on circuits and systems for video
technology, 8(2), 191–205. doi: 10.1109/76.664104
Rasti, J., Monadjemi, A., & Vafaei, A. (2011). Color reduction using a multi-stage
Kohonen self-organizing map with redundant features. Expert Systems with
Applications, 38(10), 13188–13197. doi: 10.1016/j.eswa.2011.04.132
Robbins, H. & Monro, S. (1951) A Stochastic Approximation Method. Annals of
Mathematical Statistics, 22(3), 400–407. doi:10.1214/aoms/1177729586
Rumelhart, D. E., & Zipser, D. (1985). Feature discovery by competitive
learning. Cognitive science, 9(1), 75–112. doi: 10.1016/S0364-0213(85)80010-0
Schaefer, G., & Zhou, H. (2009). Fuzzy clustering for colour reduction in
images. Telecommunication Systems, 40(1), 17–25. doi: 10.1007/s11235-008-
9143-8
Schaefer, G., Hu, Q., Zhou, H., Peters, J. F., & Hassanien, A. E. (2012). Rough c-means
and fuzzy rough c-means for colour quantisation. Fundamenta
Informaticae, 119(1), 113–120. doi: 10.3233/FI-2012-729
Thompson, S., Celebi, M. E. & Buck, K. H. (2020) Fast color quantization using
MacQueen’s k-means algorithm. Journal of Real-Time Image Processing 17 (5),
1609–1624. doi:10.1007/s11554-019-00914-6
Valenzuela, G., Celebi, M. E., & Schaefer, G. (2018, October). Color quantization using
coreset sampling. In 2018 IEEE International Conference on Systems, Man, and
Cybernetics (SMC), 2096–210. IEEE. doi: 10.1109/SMC.2018.00361
Wan, S. J., Prusinkiewicz, P., & Wong, S. K. M. (1990). Variance-Based Color Image
Quantization for Frame Buffer Display. Color Research and Application, 15(1),
52–58. doi: 10.1002/col.5080150109
21
Wang, C. H., Lee, C. N., & Hsieh, C. H. (2007). Sample-size adaptive self-organization
map for color images quantization. Pattern Recognition Letters, 28(13), 1616–
1629. doi: 10.1016/j.patrec.2007.04.005
Wen, Q., & Celebi, M. E. (2011). Hard versus Fuzzy C-Means Clustering for Color
Quantization. EURASIP Journal on Advances in Signal Processing, 2011, 118–
129. doi: 10.1186/1687-6180-2011-118
Wu, X. (1991). Efficient Statistical Computations for Optimal Color Quantization. In: J.
Arvo (Ed.), Graphics Gems , 3, 126–133. Academic Press. doi: 10.1016/B978-0-
08-050754-5.50035-9
Wu, K. L., Yang, M. S. (2006). Alternative learning vector quantization. Pattern
Recognition, 39(3), 351–362. doi: 10.1016/j.patcog.2005.09.011
Wu, X., Kumar, V., Quinlan, J. R., et al. (2008). Top 10 Algorithms in Data Mining.
Knowledge and Information Systems, 14, 1–37. doi: 10.1007/s10115-007-0114-2
Xiang, Z. (1997). Color Image Quantization by Minimizing the Maximum Intercluster
Distance. ACM Transactions on Graphics, 16(3), 260–276. doi:
0.1145/256157.256159
Yair, E., Zeger, K., & Gersho, A. (1992). Competitive Learning and Soft Competition for
Vector Quantizer Design. IEEE Transactions on Signal Processing, 40(2), 294–
309. doi: 10.1109/78.124940
Yang, C. Y., & Lin, J. C. (1996). RWM-Cut for Color Image Quantization. Computers &
Graphics, 20(4), 577–588. doi: 10.1109/ICDAR.1995.601984
22
Figure 1. Test Images
23
Figure 2. Baboon output images (K= 32)
(a) Original
24
Figure 3. Baboon error images (K =32)
25
Figure 4. Peppers output images (K = 64)
(a) Original
26
Figure 5. Peppers error images (K = 64)
27
Figure 6. Pills output images (K = 128)
(a) Original
28
Figure 7. Pills error images (K = 128)
29
Table 5. MSE comparison of the CQ algorithms
Algo K K
Baboon Fish
30
Table 6. MSE comparison of the CQ algorithms cont.
Algo K K
Goldhill Lenna
31
Table 7. MSE comparison of the CQ algorithms cont.
Algo K K
Motocross Parrots
32
Table 8. MSE comparison of the CQ algorithms cont.
Algo K K
Peppers Pills
33
Table 9. CPU time comparison of the CQ algorithms
K
Algorithm
32 64 128 256
Baboon
Lenna
Peppers
34