The paper presents an artificial fish swarm algorithm based on K-Means clustering. The algorithm uses the feature of having artificial fish swarm algorithm's strong robustness and being not easy to fall into local optimum value, and hence dynamically determines the number of clusters and center, overcoming the defects of K-Means clustering initial point selected unstable. The image segmentation is processed based on the fusion of two algorithms. The test proves the algorithm is ideal.