/Dominant-Image-Color

It is a python program that is able to extract the colors in an image, give their percentage dominance and their corresponding hex codes.

Primary LanguageJupyter Notebook

Dominant Color Extraction Dominance and Recoloring

A Python program to extract the dominant colors of an image and visualize their dominance using the K-Means clustering algorithm. The program then regenerates the image using the dominant colors identified as K centers.

Dependencies

  • OpenCV-Python
  • Numpy
  • Matplotlib
  • Scipy
  • Sklearn

Requirements

To run this program, you will need either:

  1. Jupyter Notebook installed on your system, or
  2. Jupyter extension in VS Code for running .ipynb files.

Usage

  1. Clone the repository to your local machine.
  2. Ensure all dependencies are installed.
  3. Open the Jupyter Notebook file (dominant_color_extraction.ipynb) using either Jupyter Notebook or the Jupyter extension in VS Code.
  4. Follow the instructions within the notebook to process your images.

About

This project was developed to explore the use of K-Means clustering in color extraction and image recoloring.

To know more about the developer, you can connect with them on LinkedIn.