Kmeans implementation in spark, for video processing project.