Kmeans cluster analysis of images in Python