A cotton image segmentation algorithm based on K-means clustering and marking watershed is proposed to solve the problem of low cotton recognition affected by uneven illumination and complex background.Based on the difference of color information between cotton and background
K-means clustering algorithm is used to classify cotton with complex background into four categories: cotton leaf
cotton
soil and cotton branch.Furthermore
based on the difference of brightness between cotton and background
two-dimensional Otsu algorithm is used to segment the cotton target for the first time
and marked-based watershed algorithm is used to complete the target recognition. Experiments show that the improved marked-based watershed algorithm can effectively solve the problem of over-segmentation of cotton targets
and significantly improve the recognition rate. At the same time
this method has reference value for the design of flower picking vision system with similar characteristics.