Classify an image sequence by the K-means algorithm in a remote shell Used as a subroutine to kmeans_classify