(Swift 3)
This project tries to obtain the most accurate dominant n
number of colors in an image.
To obtain the colors I use a k-mean clustering algorithm to cluster pixels and find the most dominant colors. For more accurate representation I also created a k-means++ initialization algorithm to better place initial centroid nodes.
Execution time currently takes ~1.6s for most images. I'll look into Color Quantization to see if it is viable to use this algorithm instead.