Search code examples
machine-learningimage-processingcomputer-visionhierarchical-clusteringquantization

Extracting Dominant / Most Used Colors from an Image


I would like to extract the most used colors inside an image, or at least the primary tones Could you recommend me how can I start with this task? or point me to a similar code? I have being looking for it but no success.


Solution

  • You can get very good results using an Octree Color Quantization algorithm. Other quantization algorithms can be found on Wikipedia.