摘要
针对棉花识别中由于光照不均、背景复杂等不利影响降低识别率的问题,提出了一种基于K均值聚类的棉花HSV图像分割算法。基于HSV颜色空间下棉花目标在颜色上与背景存在着明显差异的特点,在分割中使用K均值聚类算法将复杂背景下的棉花分成棉叶、棉花、土壤和棉枝四类。首先对样本采取预处理操作,然后使用空间转换算法和K均值聚类算法进行图像处理,进一步在HSV颜色空间下依据色彩信息确定聚类的数目,利用二维Otsu算法对图像进行分割操作。通过实验验证,基于K均值聚类和二维Otsu的棉花HSV图像分割算法可以使分割结果更加准确且边缘更加整洁,分割正确率达到80%,同时该方法对具有同类特征的花卉采摘视觉系统的设计具有参考价值。
A cotton image segmentation algorithm based on K-means clustering and two-dimensional Otsu is proposed to solve the problem of cotton recognition which is affected by uneven illumination and complex background. Based on the color difference between the cotton target and the background in HSV color space, K-means clustering algorithm is used to divide the cotton image in complex background into four categories: cotton leaf, cotton, soil and cotton branch. Firstly, the sample is preprocessed, then the image is processed by spatial conversion algorithm and K-means clustering algorithm, and then the number of clusters is determined according to the color information in HSV color space. Finally, the image is segmented by two-dimensional Otsu algorithm. Through the experimental verification, the cotton HSV image segmentation algorithm based on K-means clustering and two-dimensional Otsu can make the segmentation result more accurate and the edge more neat, and the segmentation accuracy reaches 80%. At the same time, this method has reference value for the design of flower picking vision system with similar characteristics.
作者
夏亚飞
XIA Ya-fei(Zhengzhou Baoye Steel Structure Co.,Ltd.,Zhengzhou,Henan 450000,China)
出处
《软件》
2020年第7期170-173,共4页
Software