Skip to content
Mini-project that runs a Python script to generate a list of major colours in the input image file. Uses Open-CV and the concept of K-Means clustering.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Run
TestOutput
OUTPUT.txt
README.md

README.md

Fetch Colors From Image

Mini-project that runs a Python script to generate a list of major colours in the input image file. Uses Open-CV and the concept of K-Means clustering.

Dependencies:

  • Python version: 3.7.4
  • Python modules: Open CV, pandas, numpy, Sci Kit Learn, math
  • colors.csv file generated using the wonderful project developed by @codebrainz
  • Input image to be in .jpg/.jpeg format (as of now). PNG might work too.

Further improvements

  • Try to use separate K-Means clustering code to remove dependency over sklearn
  • Expand the colors.csv look-up table to include more colours although it works okay as of now
  • Try to optimize the code

Steps

  • Run script.py inside Run
  • Be sure to modify the path of the input image and no of colours to be fetched at the relevant locations

Inspiration

The amazing work by @rodartha

You can’t perform that action at this time.