Abstract In order to better solve the shortcomings of the k-means clustering method and density peaks clustering (DPC) method in agricultural image segmentation, this work proposes a method to divide points in a high-dimensional space, and a clustering method is obtained to divide crops and soil. In the process of assigning points in the DPC method, if a point is divided incorrectly, a series of points may be assigned to a cluster that is not related to it. In response to this problem, this study uses the decision graph to select the centroids, and uses Gaussian kernel to map the data to the high-dimensional space, each centroid searches for the most relevant points in the high-dimensional space until a temporary boundary point is found to stop the first assignment strategy, and then the points that are not clustered are assigned to the correct cluster to complete the clustering. The experimental results show that the proposed method has a better clustering effect through experiments on multiple artificial datasets and UCI datasets, compared with other clustering methods, and finally applied to plant image segmentation.