Abstract:In the study of crop nutrition diagnosis based on machine vision, it is usually necessary to collect leaf samples and quantitatively determine their nutrient content under laboratory conditions. However, due to the overlapping of leaves, the leaf samples cannot be clearly reflected in the canopy image. In order to solve this problem, it is needed to use image analysis technology to effectively extract the leaves in the crop canopy image and according to the processing results to collect laboratory test samples. Based on the complex background extraction, gradient graph calculation, wavelet transform, marker selection and watershed segmentation, the leaf segmentation of tomato canopy multispectral image was realized. Firstly, four kinds of complex background elimination algorithms were compared. It was found that the threshold segmentation based on normalized difference vegetation index (NDVI) was accurate when the enhancement factor was 1.3, which was suitable under various lighting conditions, and the space-time complexity was low. Secondly, in the aspect of gradient graph calculation, the morphological gradient of near-infrared (NIR) band image can eliminate the texture of the leaves caused by veins, light and so on while keeping the target edge. Then, markers of leaves were selected according to wavelet transform that used the low-frequency coefficient of 4-level db4 wavelet decomposition and H-maxima transform with threshold of 18. Finally, the results of wavelet transform watershed segmentation and mathematical morphology watershed segmentation were superimposed, and it was found that the average segmentation error rate of tomato canopy leaves was 21% for complex background and different light intensities, which provided some technical support for the analysis of tomato leaf nutrient content detection.