Introduction - If you have any usage issues, please Google them yourself
k-means clustering algorithm to achieve gray-scale image segmentation, the input image matrix and the number of cluster centers, the return for the final image of the cluster centers and their respective categories in each pixel number (corresponding to the image matrix)