For unsupervised color image segmentation, we propose a two-stage algorithm, KmsGC, that combinesK-means clustering with graph cut. In the first stage,K-means clustering algorithm is applied to make an initial clustering, and the optimal number of clusters is automatically determined by a compactness criterion that is established to find clustering with maximum intercluster distance and minimum intracluster variance. In the second stage, a multiple terminal vertices weighted graph is constructed based on an energy function, and the image is segmented according to a minimum cost multiway cut. A large number of performance evaluations are carried out, and the experimental results indicate the proposed approach is effective compared to other existing image segmentation algorithms on the Berkeley image database.