dictionary geneneration via kmeans implemented for one image.  To be expanded to multiple images