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.
- OpenCV-Python
- Numpy
- Matplotlib
- Scipy
- Sklearn
To run this program, you will need either:
- Jupyter Notebook installed on your system, or
- Jupyter extension in VS Code for running
.ipynb
files.
- Clone the repository to your local machine.
- Ensure all dependencies are installed.
- Open the Jupyter Notebook file (
dominant_color_extraction.ipynb
) using either Jupyter Notebook or the Jupyter extension in VS Code. - Follow the instructions within the notebook to process your images.
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.