欢迎访问《中国农学通报》,

中国农学通报 ›› 2022, Vol. 38 ›› Issue (27): 151-156.doi: 10.11924/j.issn.1000-6850.casb2021-0918

所属专题: 生物技术 油料作物

• 食品·营养·检测·安全 • 上一篇    下一篇

基于颜色和纹理特征的花生仁外观品质检测研究

杨露露(), 秦华伟()   

  1. 杭州电子科技大学机械工程学院,杭州 310018
  • 收稿日期:2021-09-26 修回日期:2021-12-02 出版日期:2022-10-05 发布日期:2022-09-21
  • 通讯作者: 秦华伟
  • 作者简介:杨露露,男,1997年出生,硕士研究生,从事图像处理研究。通信地址:310018 浙江省杭州市钱塘区 杭州电子科技大学,E-mail: 1358551473@qq.com

Study on Peanut Appearance Quality Detection Based on Color and Texture Features

YANG Lulu(), QIN Huawei()   

  1. School of Mechanical Engineering, Hangzhou Dianzi University, Hangzhou 310018
  • Received:2021-09-26 Revised:2021-12-02 Online:2022-10-05 Published:2022-09-21
  • Contact: QIN Huawei

摘要:

为了提高对花生仁外观缺陷的在线分类准确率及效率。通过对采集完好、破损、霉变的花生仁RGB图像进行均值位移法、灰度处理以及阈值分割等预处理,研究提取了花生仁HSV颜色空间下的H、S、V各分量的一阶矩和二阶矩共6个颜色特征值,再基于灰度共生矩阵法提取能量、熵、对比度、逆差分矩共4个纹理特征值,构建颜色和纹理结合的特征向量,最后分别采用BP神经网络和SVM分类器对花生仁进行分类识别。结果表明:在花生仁的整体识别准确率上,BP神经网络为96.67%,SVM分类器为97.22%,后者优于前者,在识别时间上BP和SVM分别为2.5 s和1.1 s,识别效率上也是SVM更好,综合识别准确率和效率两方面考虑,优先选择SVM分类器模型来对花生仁进行分类识别。

关键词: 花生仁, 计算机视觉, 颜色特征, 纹理特征, BP神经网络, SVM

Abstract:

The aim of this study is to improve the accuracy and efficiency of the on-line classification of peanut appearance defects. Preprocessing of RGB images of intact, damaged and moldy peanut kernels was conducted using mean shift method, grayscale processing and threshold segmentation. The research extracted 6 color eigenvalues of the first and second moments of the H, S and V components in the HSV color space of the peanut image, and four texture feature values, including energy, entropy, contrast and deficit moment, based on gray level co-occurrence matrix method. Then, we constructed a feature model combined of color and texture vectors. Finally, peanuts were detected and classified by BP neural network and SVM classifier, respectively. The results showed that the overall recognition accuracy of peanut kernels was 96.67% by BP neural network and 97.22% by SVM classifier, and the latter is better than the former. The recognition time of BP and SVM was 2.5 s and 1.1 s, respectively, and SVM classifier also had better recognition efficiency. Considering the accuracy and efficiency of recognition, the SVM classifier model is preferred in distinguish peanut kernels.

Key words: peanut kernels, computer vision, color features, texture features, BP neural network, SVM

中图分类号: