For each cluster, the mean value of all samples is taken as the new cluster center; Step 5: Repeat the Steps 2 to 4 until the centroids no longer change. The segmentation image of the target fruit is obtained, and then the contour is extracted by morphological methods. It can be seen ...