Open Access Open Access  Restricted Access Subscription Access
Open Access Open Access Open Access  Restricted Access Restricted Access Subscription Access

K-Means with Sampling for Determining Prominent Colors in Images


Affiliations
1 Department of Computer Science, Rutgers University, United States
2 Department of Applied Computing, Georgian Court University, United States
3 Department of Computer Science, Rutgers University, India
     

   Subscribe/Renew Journal


A tool that quickly calculates the dominant colors of an image can be very useful in image processing. The k-means clustering algorithm has this potential since it partitions a set of data into n clusters and returns a representative data point from each cluster. We discuss k-means with sampling for images, which applies k-means clustering to a random sample of image pixels. We found that even with a small random sample of pixels from the image, k-means with sampling exhibits no significant loss of correctness. We examine the usefulness and limitations of k-means clustering in determining the prominent colors of an image and identifying trends in large sets of image data.

Keywords

K-Means, Clustering, Color, Image
Subscription Login to verify subscription
User
Notifications
Font Size

  • S. Na, L. Xumin and G. Yong, “Research on K-Means Clustering Algorithm: An Improved K-Means Clustering Algorithm”, Proceedings of Symposium on Intelligent Information Technology and Security Informatics, pp. 63-67, 2010.
  • M.W. Celebi, “Color Medical Image Analysis”, Springer, 2013.
  • M. Mahajan, P. Nimbhorkar and K. Varadarajan, “The Planar K-Means Problem is NP-Hard”, Theoretical Computer Science, Vol. 442, pp. 13-21, 2012.
  • I.P. Kumar, V.P.H. Gopal, S. Ramasubbareddy, S. Nalluri, and K. Govinda, “Dominant Color Palette Extraction by K-Means Clustering Algorithm and Reconstruction of Image”, Springer, pp. 921-929, 2020.
  • I.C. Mogotsi, C.D. Manning, P. Raghavan, and H. Schütze, “Introduction to Information Retrieval”, Cambridge University Press, Cambridge, 2008.
  • A. Broder, L. Garcia-Pueyo, V. Josifovski, S. Vassilvitskii, and S. Venkatesan, “Scalable K-Means by Ranked Retrieval”, Proceedings of ACM International Conference on Web Search and Data Mining, pp. 233-242, 2014.
  • P.S. Bradley and U.M. Fayyad, “Refining Initial Points for K-Means Clustering”, Proceedings of International Conference on Machine Learning, pp. 91-99, 1998.
  • P. Franti and S. Sieranoja, “How Much Can k-Means be Improved by using Better Initialization and Repeats?”, Pattern Recognition, Vol. 93, pp. 95-112, 2019.
  • T. Kanungo, D.M. Mount, N.S. Netanyahu, C.D. Piatko, R. Silverman and A.Y. Wu, “An Efficient K-Means Clustering Algorithm: Analysis and Implementation”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 24, pp. 881-892, 2002.
  • C. Yuan and H. Yang, “Research on K-Value Selection Method of K-Means Clustering Algorithm”, Multidisciplinary Science Journal, Vol. 2, pp. 226-235, 2019.
  • M. Luo, Y.F. Ma and H.J. Zhang, “A Spatial Constrained K-Means Approach to Image Segmentation”, Proceedings of International Conference on Multimedia, Vol. 2, pp. 738-742, 2003.
  • M. Omran, A.P. Engelbrecht and A. Salman, “Particle Swarm Optimization Method for Image Clustering”, International Journal on Pattern Recognition and Artificial Intelligence, Vol. 19, pp. 297-321, 2005.
  • R. Vitale, J.M. Prats-Montalban, F. Lopez-Garcia, J. Blasco and A. Ferrer, “Segmentation Techniques in Image Analysis: A Comparative Study”, Chemometrics, Vol. 30, pp. 749-758, 2016.
  • A. Molada Tebar and S. Westland, “Dominant Color Extraction with K-Means for Camera Characterization in Cultural Heritage Documentation”, Remote Sensing, Vol. 12, pp. 520-534, 2020.
  • C. Wu, B. Yan and R. Yu, “K-Means Clustering Algorithm and its Simulation Based on Distributed Computing Platform”, Complexity, Vol. 2021, pp. 1-10, 2021.
  • D. Kann, “As a Megadrought Persists, New Projections Show a Key Colorado River Reservoir could Sink to a Record Low Later this Year”, Available at https://edition.cnn.com/2021/04/19/weather/western-drought- colorado-river-cutbacks-study/index.html, Accessed at 2021.
  • K.N. Blain, “Adam Toledo’s Killing is part of a Brutal Pattern of Child Killings in America”, Available at: https://www.msnbc.com/opinion/adam-toledo-s-killing-part-brutal-pattern-child-killings-america-n1264432, Accessed at 2021.
  • G. Collins and B. Stephens, “Tell Me the One About the Presidential Candidate Who Ran for Mayor”, Available at: https://www.nytimes.com/2021/04/19/opinion/indianapolis-yang-giuliani-cuomo.html, Accessed at 2021.
  • E. Goldberg and Y. Paskova, “They Told Her Women Couldn’t Join the Ambulance Corps. So She Started Her Own”, Available at: https://www.nytimes.com/2021/04/19/us/ezras-nashim-womens-EMT.html, Accessed at 2021.
  • A. Krueger, “Why Reopening Ceremonies Are So Important in New York Right Now”, Available at: https://www.nytimes.com/2021/04/16/nyregion/coronavirus-nyc-reopening.html, Accessed at 2021.
  • S. Deb, “Regular People Keep Challenging N.B.A. and W.N.B.A. Players”, Available at: https://www.nytimes.com/2021/04/19/sports/basketball/why-the-worst-nba-player-is-probably-still-better-than-you.html, Accessed at 2021.
  • C. Dema and M. Ives, “How Bhutan Out-Vaccinated Most of the World”, Available at: https://www.nytimes.com/2021/04/18/world/asia/bhutan-vaccines-covid.html, Accessed at 2021.
  • A. Troianovski, “Navalny’s Network is Disbanding, Citing Pressure From Putin”, Available at: https://www.nytimes.com/2021/04/29/world/europe/navalny-group-putin-russia.html, Accessed at 2021.
  • M. Eddy, “German Greens and Conservatives Choose Chancellor Candidates”, Available at: https://www.nytimes.com/2021/04/19/world/europe/germany-greens-chancellor-annalena-baerbock.html, Accessed at 2021.
  • N. Cumming Bruce, “U.N. Panel Is Scathing in its Criticism of a British Report on Race”, Available at: https://www.nytimes.com/2021/04/19/world/europe/britain-race-united-nations-boris-johnson.html, Accessed at 2021.
  • M. Caro, “Taking Over Victory Gardens to Make a ‘Theater for All’”, Available at: https://www.nytimes.com/2021/04/18/theater/ken-matt-martin-victory-gardens.html, Accessed at 2021.
  • B. Brantley, “How Helen McCrory Shone, Even in a Haze of Mystery”, Available at: https://www.nytimes.com/2021/04/17/theater/helen-mccrory-appraisal.html, Accessed at 2021.
  • A. Wall, “Finding Love and All Its Quirks, Even If 2,654 Miles Away”, Available at: https://www.nytimes.com/2021/04/30/fashion/weddings/sarah-lenz-stephen-paskey-wedding.html, Accessed at 2021.
  • S. Sifton, “New Week! New Recipes!”, Available at: https://www.nytimes.com/2021/04/19/dining/new-week-new-recipes.html, Accessed at 2021.
  • E. Asimov, “One Year Later: How U.S. Winemakers Averted Disaster”, Available at: https://www.nytimes.com/2021/04/15/dining/drinks/wine- pandemic.html, Accessed at 2021.
  • New York Times, “Birds by the Billions: A Guide to Spring’s Avian Parade”, Available at: https://www.nytimes.com/2021/04/15/travel/birding-america.html, Accessed at 2021.
  • P. McClanahan and D. Kamin, “52 Places, Virtually”, Available at:
  • https://www.nytimes.com/2020/04/14/travel/52-places-to-go-virtual-travel.html, Accessed at 2021.
  • C. Arisman, “On the Water in Alaska, Where Salmon Fishing Dreams Live On”, Available at: https://www.nytimes.com/2021/04/19/travel/alaska-salmon-fishing.html, Accessed at 2021.
  • R. Kaysen, “The Chelsea Hotel Becomes a New York Battleground”, Available at: https://www.nytimes.com/2021/04/16/nyregion/chelsea-hotel-nyc.html, Accessed at 2021.
  • S. Franklin, “Homes for Sale in Manhattan, Brooklyn and Queens”, Available at: https://www.nytimes.com/2021/04/15/realestate/housing-market-nyc.html, accessed August19,2021.
  • M. Roach, “Why Diversity Is an Advantage in a Vegetable Plot”, Available at: https://www.nytimes.com/2021/04/14/realestate/why-diversity-is-an-advantage-in-a-vegetable-plot.html, Accessed at 2021.
  • CNN Business, “Stock market news today: Dow and S&P 500 updates”, Available at: https://edition.cnn.com/business/live-news/stock-market-news-040721/index.html, Accessed at 2021.
  • V. Greenwood, “Fairy Circles in Australia May Be Due to Microbes, Study Says”, Available at: https://www.nytimes.com/2021/04/12/science/fairy-circles-australia.html, Accessed at 2021.
  • A. Mandavilli, “Could the Pandemic Prompt an ‘Epidemic of Loss’ of Women in the Sciences?”, Available at: 2021, https://www.nytimes.com/2021/04/13/health/women-stem- pandemic.html, accessed August 19, 2021.
  • C. Siemaszko, “Michelle Obama Embraces George W. Bush: Why That Photo Was So Moving”, Available at: https://www.nbcnews.com/news/us-news/michelle-obama-embraces-george-w-bush-why-photo-was-so-n654451, Accessed at 2021.
  • A.C. Elassar, “A giant, indoor vertical farm aims to bring jobs and fresh produce to Compton”, Available at: https://edition.cnn.com/2021/04/19/business/compton-vertical-farm-plenty-trnd/index.html, Accessed at 2021.
  • K.C. Rogers, “Summer concerts are almost here, but will they be safe? What you should know.”, Available at: https://edition.cnn.com/travel/article/concert-music-festival-safety-pandemic-wellness/index.html, Accessed at 2021.
  • “K-means clustering in OpenCV”, OpenCV, Available at: docs.opencv.org/master/d1/d5c/tutorial_py_kmeans_opencv.html, Accessed at 2021.
  • H.T. Nguyen, E.H. Lee, C.H. Bae and S. Lee, “Multiple Object Detection Based on Clustering and Deep Learning Methods”, Sensors, Vol 20, pp. 4424-4434, 2020.

Abstract Views: 58

PDF Views: 2




  • K-Means with Sampling for Determining Prominent Colors in Images

Abstract Views: 58  |  PDF Views: 2

Authors

Angelina Cheng
Department of Computer Science, Rutgers University, United States
Eric Rosenberg
Department of Applied Computing, Georgian Court University, United States
Alina Gorbunova
Department of Computer Science, Rutgers University, India

Abstract


A tool that quickly calculates the dominant colors of an image can be very useful in image processing. The k-means clustering algorithm has this potential since it partitions a set of data into n clusters and returns a representative data point from each cluster. We discuss k-means with sampling for images, which applies k-means clustering to a random sample of image pixels. We found that even with a small random sample of pixels from the image, k-means with sampling exhibits no significant loss of correctness. We examine the usefulness and limitations of k-means clustering in determining the prominent colors of an image and identifying trends in large sets of image data.

Keywords


K-Means, Clustering, Color, Image

References