The method is explained here: http://charlesleifer.com/blog/using-python-and-k-means-to-find-the-dominant-colors-in-images/ It uses KMeans to cluster pixels. The pixel value of the centroid of one cluster is the dominant color of that cluster. An image may have many dominant colors. The number...
www.b4x.com