Project Brief
This project extracts the dominant colors from any image and creates a color palette. It uses OpenCV to load the image and scikit-learn’s KMeans clustering to find the main colors. This project will teach you about clustering algorithms and image processing while producing visually engaging results!
Expected Output
The program reads an image.png file such as the one below:
After running the program, it should generate and display the color palette for the input image using matplotlib. For the image above, the color palette would be this:
Prerequisites
Required Libraries: opencv, numpy, scikit-learn, matplotlib
pip install opencv-python numpy scikit-learn matplotlib
Required Files: No files are required for this project.
IDE: You can use any IDE on your computer to code the project.
Danger Zone
Here is the code solution and the steps to get the app up and running:
Happy Coding!
Daily Python Projects Team