## 1 Introduction  
Precision agriculture is the trend of modern agriculture development. The promotion of automatic transplanting machines has improved agricultural efficiency and reduced agricultural production costs. It is an important embodiment of precision agriculture. The seedling defects seriously reduce the operation effect of the transplanting machine. Automatic identification and compensation technology for defective seedlings comprise an important engineering technique to improve the pass rate of mechanized transplanted seedlings. The automatic identification technology of defect seedlings is affected by unfavorable factors such as an unstructured transplanting environment and seedling morphology, which leads to identifiable defect types, causing the recognition accuracy and algorithm processing time to not be able meet the production requirement. The difficulty of the defect seedling identification algorithm lies in accurately segmenting seedlings from the image with huge differences in the unstructured transplanting environment and identifying them with appropriate features. In recent years, the research on defect seedling identification technology included seedling information acquisition technology [1; 2; 3], seedling and background segmentation [4; 5], and seedling defect identification technology [6; 7; 8]. Advanced technologies such as hyperspectral image sensors, near-infrared image sensors, machine learning techniques, and artificial neural network technologies have played an important role. [PERSON] [5] proposed a color image segmentation algorithm based on principal component analysis (PCA) and the variance (CV) model, which realized the extraction of corn seedling targets under a complex background. [PERSON] [9] proposed a rice seedling segmentation algorithm based on the YCrCb color space (a color space where the Y channel means luminance, Cr means the difference between the R channel in the RGB color space and the Y channel, and Cb means the difference between the B channel in the RGB color space and the Y channel) and an improved Otsu method. The probability parameters were used to weight the background variance of the intra-class variance to improve the accuracy of the image segmentation algorithm for the bimodal and near-single peak histogram image. [PERSON] [10] proposed a cooperative segmentation algorithm based on the Markov random field optimization model to realize automatic segmentation of cotton leaves under natural lighting conditions. [PERSON] [11] used the threshold segmentation method, region growing segmentation method, and region segmentation method to segment the pre-processed corn images and proposed a scoring based image processing effect evaluation method. [PERSON] [12] used deep learning and traditional image processing algorithms to identify nuclei. The researchers proposed an algorithm evaluation framework that used measurement accuracy, error types, and computational efficiency as indicators and publicly released 23,165 manually annotated kernels and source code sets. The test results showed that: deep learning improved accuracy and could reduce the number of biologically relevant errors by half. [PERSON] [13] proposed a simple and novel method to segment the forehead region and to extract the average temperature from this area solving this lack of non-user interaction tools. The results provided an accuracy of 90% compared to the manual segmentation using the coefficient of Jaccard as a metric of similitude. Moreover, the method could work with real-time constraints at 83 frames per second in embedded systems with low computational resources. Segmentation of seedlings and background is one of the key steps to achieve defect seedling identification. Threshold segmentation is the most common method of image segmentation. It is divided into the artificial threshold and automatic threshold [14; 15; 16; 17; 18] according to the threshold selection method.