A C++ implementation of the winner-takes-all clustering algorithm to approximate the optimal subset of colors found in the image which can be used to reduce its color set. Running with 32 clusters will result in a new image that looks similar to the old image, but only has 32 colors present in it. It uses a matrix library, which has been included.
Usage: NumberOfClusters learningRate filename
note a good learning rate value is small, such as 0.01