首页|基于SSA-Kmeans聚类算法的青菜杂质图像分割

基于SSA-Kmeans聚类算法的青菜杂质图像分割

扫码查看
为解决青菜包装生产线在加工过程中的杂质在线检测问题,提出一种基于SSA-Kmeans的青菜杂质图像分割算法.首先利用直方图均衡化进行彩色图像增强以降低光照影响;其次基于麻雀搜索算法对初始聚类中心寻优,根据得到的最佳聚类中心,选取包含颜色信息的ab二维数据进行Kmeans聚类;然后对聚类后的图像二值化处理并用形态学滤波方法校正,最终完成图像分割.利用该算法对落叶、枯叶和黄叶等杂质进行图像分割试验,杂质平均匹配率为93.22%,平均误分率为0.70%,平均准确率为92.52%.与FCM算法、Kmeans算法、PSO-Kmeans算法的对比试验表明:本文算法分割精度更优,对不同杂质的分割均表现出良好的鲁棒性,为实现青菜杂质在线检测提供一种新方法支撑,对提高青菜机械化生产水平具有一定的实用价值.
Image segmentation of green vegetable impurities based on SSA-Kmeans clustering algorithm
In order to solve the problem of online detection of impurities in green vegetable packaging production line during processing,a green vegetable impurity image segmentation algorithm based on SSA-Kmeans is proposed.Firstly,the color image is enhanced by histogram equalization to reduce the effect of illumination.Secondly,the initial clustering center is optimized based on the sparrow search algorithm,and the ab two-dimensional data containing color information is selected for Kmeans clustering according to the best clustering center obtained.After that,the clustered image is binarized and corrected by morphological filtering method to finally complete the image segmentation.Using this algorithm for image segmentation experiments on impurities such as fallen leaves,dead leaves and yellow leaves,the average matching rate of impurities is 93.22%,the average misclassification rate is 0.70%,and the average accuracy rate is 92.52%.The comparison experiments with FCM algorithm,Kmeans algorithm and PSO-Kmeans algorithm show that the segmentation accuracy of the algorithm in this paper is better,and the segmentation of different impurities shows good robustness,which provides a new method to support the realization of automatic picking of impurities in green vegetable and has certain practical value to improve the mechanized production of green vegetable.

green vegetable productionimpurity detectionKmeans clusteringsparrow search algorithm

刘可心、赵爽、苗玉彬

展开 >

上海电机学院机械学院,上海市,201100

上海交通大学机械与动力工程学院,上海市,201100

青菜生产 杂质检测 Kmeans聚类 麻雀搜索算法

上海市科技兴农项目国家自然科学基金项目

沪农科创字2019第2-2号51975361

2024

中国农机化学报
农业部南京农业机械化研究所

中国农机化学报

CSTPCD北大核心
影响因子:0.684
ISSN:2095-5553
年,卷(期):2024.45(2)
  • 13