kmeans currently working and tested for pgm files (not outputting colour
images yet