Dominant Color Extraction
This Python project utilizes the K-Means clustering algorithm to extract and visualize the dominant colors from an image. It's implemented in a Jupyter Notebook for interactive exploration and analysis.
🧰 Requirements
Ensure you have the following Python libraries installed:
pip install numpy opencv-python matplotlib scikit-learn scipy
📁 Project Structure
The repository contains:
Project - Dominant Color Extractions.ipynb: The main Jupyter Notebook implementing the color extraction and visualization.
img.jpg: Sample image used for color extraction.
README.md: This documentation file.
🖼️ How It Works
Image Loading: The image is loaded using OpenCV.
Reshaping: The image is reshaped into a 2D array of pixels.
K-Means Clustering: The K-Means algorithm is applied to cluster the pixels into k clusters, identifying the dominant colors.
Visualization: The dominant colors are displayed Medium
⚙️ Usage
Clone the repository:
git clone https://github.com/GauravSingh0248/Dominant-Color-Extraction.git cd Dominant-Color-Extraction
Place your image in the repository directory and update the image path in the notebook.
Open and run the Project - Dominant Color Extractions.ipynb notebook.
📷 Sample Output
Upon execution, the notebook will display: Reveal the Dominant Colors in Your Images Using Python and K-Means Clustering or Show the Extracted dominant colors.
Sample Input / Output
📚 Reach Me Out : [email protected] https://linkedin.com/in/gauravsingh0248

