Abstract:Fruit canopy information collection plays an important role in the orchard variable spray. Aiming at the problem of canopy extraction of fruit trees under background (nongreen plants) and weed disturbance, a canopy segmentation algorithm was proposed based on M-SP feature weighted clustering. The segmentation process can be described as: the original image was converted from RGB color space to HSI color space. The Mahalanobis distance similarity matrix (M) was constructed by calculating the hue (H) and saturation (S) components between fruit tree and the background; moreover, luminance feature (L) was extracted: the vertical position of the pixel was used as the position feature (P). The maximum entropy algorithm was used to extract the shadow region of the image and perform mask processing on the intensity (I) component in the HSI. The obtained shadow region was used as weighted region S of spatial feature, thereby constructing the shadow position weighting. Finally, the acquired M-SP feature matrix was normalized, and the Kmeans clustering of the upper background, the lower background, the fruit canopy and the weeds were respectively performed, and the image segmentation was finally completed. In order to verify the accuracy of the quantitative verification algorithm, precision, recall and F1scores were used to evaluate the image segmentation results under different weed disturbance levels (slight, medium and strong) and time segments (morning, noon and evening). The Kmeans and Gaussian mixture model (GMM) without feature extraction were used respectively as comparative experiments. The results showed that the proposed method was robust to the canopy segmentation of fruit trees under different weed interference levels and different shooting time periods. The average precision was 87.1%, the average recall was 87.7%, and the average F1scores was 87.1%. The segmentation and verification results showed that the algorithm can accurately segment the canopy area of fruit trees, which provided a reference for collecting the canopy information of fruit trees by computer vision.