针对枸杞分级过程中出现的粘连枸杞分级效率不高、准确性低的缺点,提出了一种基于形态学分水岭和区域面积加权的粘连枸杞分级方法。对粘连的枸杞图像进行形态学预处理消除枸杞烘干晾晒过程中产生的细小噪声,在保持区域轮廓位置不变的同时,尽可能地消除不规则边缘;运用标记极小值的分水岭算法分割图像,依据枸杞红色分量的分布剔除霉变颗粒,对正常枸杞二值图像运用区域面积标记算法扫描标定各个目标获取颗粒的面积,并用霍特林算法获取颗粒的长宽比;以长宽比作为面积的权值对面积加权修正后进行聚类分析,分成3类。实验结果表明:该方法能够较快速、准确地对不同大小的粘连枸杞颗粒进行分类。
Aiming at problem of poor efficiency and low accuracy of manual operation of sorting the touching wolfberry,a touching wolfberry classification method based on morphological watershed and regional area weighted is proposed. Morphological operation is used for touching wolfberry image pre-processing to eliminate noise interference caused by drying or basking,remain the position of the region outline unchanged while eliminating irregular edges as much as possible; the watershed algorithm is used for image segmentation that has been marked the minimum region. According to the red( R) component distribution of the single wolfberry in the image,the mildew wolfberry particles will be removed,and through area mark algorithm,particles area of the normal binary wolfberry image will be labeled,and using Hotelling algorithm to obtain length-width ratio of particles; using the length-width ratio as weighting of area for cluster analysis after weighting correction,it is divided into three kinds.The experimental results show that this method can classify different sizes of touching wolfberry more quickly and accurately.