基于计算机视觉的花椒外观品质检测及其MATLAB实现

    Prickly ash appearance quality detection based on computer vision and its implementation in MATLAB

    • 摘要: 为适应花椒快速、准确、自动分级的要求,提出了基于计算机视觉的花椒外观品质检测方法,以避免传统的人眼感观检测存在的可重复性差、效率低、随意性大等缺陷。针对Canny算子边缘检测后,花椒样本图像中仍有部分个体的边界不连续、直接对边缘检测结果填充时效果较差,提出了更能有效识别花椒籽粒的二次填充算法。通过分别比较椒籽、闭眼、果穗梗和果皮的凹性率、椭圆度、面积值,发现四种成分的同一形态特征有一定差异,可作分离参数。试验和数据分析表明,图像分辨率为600dpi时,取凹性率0.95、面积值7000像素可先分离出椒籽,再取椭圆度0.9能分离出果穗梗,最后取凹性率0.8964、椭圆度0.5072能有效区分余下的闭眼和果皮。利用MATLAB R2006a软件平台开发了花椒外观品质计算机视觉检测系统软件,实现了对颗粒均匀度、椒籽率、闭眼率和果穗梗率指标值的检测。试验结果表明:该方法合理有效、程序设计可靠、识别效果良好,对椒籽、果穗梗正确识别率达100%,闭眼及果皮正确识别率分别达89%、96.8%,为进一步完善花椒外观品质的计算机视觉检测提供了理论基础和技术支持。

       

      Abstract: A new approach to prickly ash appearance quality detection was presented based on the computer vision technology tomeet the requirements of speediness, automation, high accuracy, and avoid using traditional manual method which encounters with some problems such as bad repeatability, low efficiency and high random. Images with the method of edge detection by Canny detector have some granules whose edge information was not extracted continuously, so a new algorithm named as second filling was presented to recognize the granule more accurately. Research indicates that each kind of shape feature such as solidity, eccentricity and area has different values and can be used as the separating parameters by comparing each feature respectively for the four ingredients, which are the seed, the fruit coat closing, the peduncle and the seedcase. Experiment and data analysis illustrate that, with the image resolution being 600dpi, the seed can be separated firstly if only solidity and area are 0.95 and 7000 pixels respectively, then the peduncle can be separated with the eccentricity being 0.9, the fruit coat closing and seedcase can be separated finally if the solidity and eccentricity are 0.8964 and 0.5072 respectively. A prickly ash appearance quality detection software was developed correspondingly in the platform of MATLAB R2006a, and indexes such as degree of uniformity, rate of seed,rate of fruit coat closing and rate of peduncle were detected by the system. The results show that the identifying accuracy is 100% for both the seed and the peduncle, 89% and 96.8% for the fruit coat closing and the seedcase respectively. This approach is efficient and credible, so it can help to improve prickly ash quality detection with computer vision theoretically and technologically.

       

    /

    返回文章
    返回