Fast Color Quantization Using Macqueen's K-Means Algorithm

Fast Color Quantization Using Macqueen's K-Means Algorithm

FAST COLOR QUANTIZATION USING MACQUEEN’S K-MEANS ALGORITHM by Skyler Thompson A thesis presented to the Department of Computer Science and the Graduate School of the University of Central Arkansas in partial fulfillment of the requirements for the degree of Master of Science in Computer Science Conway, Arkansas May 2020 ProQuest Number:27744999 All rights reserved INFORMATION TO ALL USERS The quality of this reproduction is dependent on the quality of the copy submitted. In the unlikely event that the author did not send a complete manuscript and there are missing pages, these will be noted. Also, if material had to be removed, a note will indicate the deletion. ProQuest 27744999 Published by ProQuest LLC (2020). Copyright of the Dissertation is held by the Author. All Rights Reserved. This work is protected against unauthorized copying under Title 17, United States Code Microform Edition © ProQuest LLC. ProQuest LLC 789 East Eisenhower Parkway P.O. Box 1346 Ann Arbor, MI 48106 - 1346 TO THE OFFICE OF GRADUATE STUDIES: The members of the Committee approve the thesis of ______________________________________Skyler Thompson presented on ___________________________________________________________03/03/2020 . Digitally signed by M. Emre Celebi _______________________________________M. Emre Celebi Date: 2020.03.21 10:48:41 -05'00' Committee Chairperson Digitally signed by Sinan Kockara ______________________________________Sinan Kockara Date: 2020.03.23 15:49:33 -05'00' Committee Member Digitally signed by Yu Sun DN: cn=Yu Sun, o=University of Central Arkansas, ou=Computer Yu Sun Science Dept., [email protected], c=US ______________________________________Date: 2020.03.23 16:31:32 -05'00' Committee Member ______________________________________ Committee Member ______________________________________ Committee Member © 2020 Skyler Thompson iv ACKNOWLEDGEMENT I must first and foremost thank God for providing me with the knowledge and guidance to get through my several years in college. After him, I must thank my wife for her unwavering support throughout my college career. Of course, I cannot also forget my family who have always been there through the good and the bad, encouraged me, and provided both financial and emotional support throughout my life and college career. I would also like to acknowledge Dr. Emre Celebi, professor and department chair at the University of Central Arkansas. It is from him that the topic of this thesis and my foreknowledge of data clustering stems. He was always available to respond to emails and to help me through the difficult parts of both this paper and my research. Without him, I never would have chosen to do a thesis and would have missed out on this entire experience. Finally, I would like to thank my boss, my supervisor, and my work colleagues. Without their support and backing in my workplace, I never would have had the time to dedicate to my research and to this thesis. v ABSTRACT Although not strictly necessary in all color image processing applications today, color quantization still plays an important role in certain, typically hardware constrained, applications. In this thesis, a novel color quantization method based on MacQueen’s k- means algorithm, is proposed and compared to the more popular batch k-means algorithm. The proposed method uses the maximin initialization method and quasi- random sampling to achieve high quality, fast, and deterministic results. In comparison to other well-known color quantization methods, the proposed method achieves very competitive results while being much faster. vi TABLE OF CONTENTS ACKNOWLEDGEMENT .................................................................................................. V ABSTRACT ..................................................................................................................... VI LIST OF TABLES ......................................................................................................... VIII LIST OF FIGURES .......................................................................................................... IX CHAPTER 1: INTRODUCTION ........................................................................................ 1 CHAPTER 2: RELATED WORK ...................................................................................... 3 CHAPTER 3: PROPOSED COLOR QUANTIZATION METHOD ................................. 7 CHAPTER 4: EXPERIMENTAL RESULTS AND DISCUSSION ................................. 13 CHAPTER 5: CONCLUSIONS AND FUTURE WORK ................................................ 31 REFERENCES .................................................................................................................. 33 vii LIST OF TABLES Table 1. Maximin Initialization Pseudocode ....................................................................... 8 Table 2. Batch K-Means Pseudocode ................................................................................ 10 Table 3. MacQueen’s K-Means Pseudocode ..................................................................... 10 Table 4. Test Images .......................................................................................................... 14 Table 5. Mean and Standard Deviation Ranks for Various Parameter Combinations ...... 17 Table 6. Comparison of Quantization Effectiveness ......................................................... 20 Table 7. Comparison of CPU Time ................................................................................... 21 viii LIST OF FIGURES Figure 1. Comparison of pseudo-random (a-c) and quasi-random (d-f) sampling ............ 12 Figure 2. Baboon output images (K = 32) ......................................................................... 25 Figure 3. Peppers output images (K = 64) ......................................................................... 26 Figure 4 Pills output images (K=128) ............................................................................... 27 Figure 5. Baboon error images (K=32) ............................................................................. 28 Figure 6. Peppers error images (K=64) ............................................................................. 29 Figure 7. Pills error images (K = 128) ............................................................................... 30 ix CHAPTER 1: INTRODUCTION Pixels in an RGB image are comprised of three-color values: red, green, and blue. RGB color images are then simply a rectangularly arranged collection of RGB triplets. Because the red, green, and blue values can each range from 0 to 255, the total number distinct colors that can be represented in a conventional 24-bit color image is 16,777,216. This can be quite a lot of information, especially with larger, more complex images. Therefore, the technique of color quantization (CQ) was conceived to help alleviate some of the storage related constraints (Heckbert, 1982). Modern hardware can easily handle these images, however there are still a large number of applications where CQ is used and where advances in this field are quite useful. Data Clustering Data Clustering is a type of unsupervised learning (Celebi and Aydin, 2015) in which data points are grouped into “clusters,” each of which is typically represented by a center. Each cluster’s data points are typically similar to each other in some sense. Various algorithms have been invented over the years for data clustering, with one of the most popular algorithms being k-means and its numerous variants. K-means is a partitional clustering method (Celebi, 2014) in which n observations are partitioned into k clusters with each observation belonging to a single cluster. In the context of CQ, clustering methods are typically divided into two different categories: pre-clustering and post-clustering. Pre-clustering methods recursively find nested clusters in either a divisive (top-down) or agglomerative (bottom-up) fashion. Pre- clustering algorithms are typically faster than post-clustering algorithms and sacrifice accuracy for speed. Post-clustering, on the other hand, find all k clusters simultaneously. 1 Color Quantization CQ is a technique in which the number of colors in an input image is significantly reduced by picking a predetermined number of colors from a palette and applying them to all similarly colored pixels in the image (Braudaway, 1987). For example, if an original image has around 100,000 colors, one may desire to reduce the number of colors to 64 in order to achieve a faster and better compression. There have been several methods devised for quantizing images over the past four decades (Heckbert, 1982) and among the best of them is k-means. K-means clustering (Celebi, 2009; Celebi, 2011) is a natural candidate because CQ can be viewed conveniently as a three-dimensional clustering problem. Like nearly all post-clustering algorithms, this technique is typically performed in two steps. The first is to choose the color palette, and the second is to map each of the original pixels to the closest color in the palette. 2 CHAPTER 2: RELATED WORK Several CQ techniques are used in the color image processing literature (Brun, 2002). Among them are: popularity (POP), median-cut (MC), modified popularity (MPOP), octree (OCT), variance-based method (WAN), greedy orthogonal bipartitioning (WU), center-cut (CC), self-organizing map (SOM), radius-weighted mean-cut (RWM), modified maximin (MMM), pairwise clustering (PWC), split and merge (SAM), Cheng and Yang (CY), fuzzy c-means (FCM), adaptive

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    46 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us