Dominant Color Extractor

Nandini Bansal

Nandini Bansal

Noida, Uttar Pradesh

0 0
  • 0 Collaborators

An Interesting Application of K-Means Clustering Algorithm ...learn more

Project status: Published/In Market

Artificial Intelligence

Code Samples [1]Links [2]

Overview / Usage

The Dominant Color Extractor makes use of the K-Means Clustering Algorithm to find/identify the most prominent colors in an image. The number of colors identified depends on the number of clusters we are forming. Each cluster represents a color.

The API version of this program accepts an image along with the number of colors to be extracted from the image and returns a JSON with color names and their respective hex code. The API has been developed using the Flask Web Framework of Python.

The API is now being used by an Android App called ColorPixor (live on Google Play Store).

This App can prove to be useful for Web Developers, Mobile App Developers and Graphic Designers while replicating a template or identifying certain color schemes from the template/graphic.

Methodology / Approach

In this project, I have used the technique of clusters to identify the color clusters in an image. The entire image is divided into multiple clusters.

Technologies Used

Technologies Used.

  • Python >=3.5
  • Flask Web Framework (for API)

Libraries Used.

  • Numpy
  • Matplotlib (not needed in API)
  • Sklearn
  • Webcolors
  • Pillow
  • JSON
  • Argparse (to accept command-line arguments)
  • Pandas

Repository

https://github.com/nandinib1999/DominantColors

Comments (0)