Online Evaluation System of Tea Quality Based on Computer Vision
-
摘要: 为实现茶叶品质在线评价及自动分级,摒除茶叶品质人工感官审评存在的缺陷,本文研发一套基于计算机视觉技术的茶叶品质在线评价及自动分级系统。采用Open CV和Visual C++开发茶叶品质在线评价软件,结合监督正交局部保持投影方法(supervised orthogonal locality preserving projections,SOLPP)对图像特征变量进行降维处理,对比随机森林(random forest,RF)、反向传播神经网络(back-propagation artificial neural network,BP-ANN)和相关向量机(relevance vector machine,RVM)茶叶品质在线评价模型,得出随机森林算法所建模型性能最好。系统自动完成茶样图像采集、原始图像预处理、特征提取、基于所建模型对待检茶样进行等级评价。控制系统根据评价结果,驱动分级及收集装置将检测茶样输送到相应等级槽中。经测试,研发系统对市售婺源仙芝绿茶、碧螺春绿茶的分级准确率达到93.00%以上。本系统结构简单,运行稳定,能将待检茶样准确送入到相应等级槽中,满足茶叶等级在线评价要求。
-
关键词:
- 计算机视觉 /
- 茶叶品质 /
- 监督正交局部保持投影 /
- 随机森林算法 /
- 在线评价
Abstract: In order to realize the online evaluation and automatic grading of tea quality, and eliminate the defects of artificial sensory evaluation of tea quality, this paper focused on development ofa set of tea quality online evaluation and automatic grading system basing on computer vision technology. The software was designed by Open CV and Visual C++ realizingthe online evaluation for tea quality, combining supervised orthogonal locality preserving projections (SOLPP) to reduce the dimensionality for image features variables. The sensory evaluation models of tea quality were respectively developed based on RF (random forest), BP-ANN (back-propagation artificial neural network) and SVR (relevance vector machine), by contrast, the performance of based RF model was the optimal. The system automatically completed the image acquisition of tea samples, original image preprocessing, feature extraction, and the grade evaluation to the tea samples based on the developed models. According to the evaluation results, the tea samples were transfered to the corresponding grading tank by the grading and collecting device droved by the control system. The prototype testing results showed that the classification accuracy rate of the Wuyuan Xianzhi green tea and Biluochun green tea reached more than 93%. This developed system had simple structure with stable operation, and the samples could be accurately sent to the corresponding grade tanks, which could meet the requirements of online evaluation of tea grade. -
表 1 模型对预测集样本进行预测结果
Table 1. Results of the model for prediction set
算法模型 特征维数 识别率(%) Kappa BP-ANN 6 91.25 0.8833 RVM 4 91.25 08833 RF 4 93.75 0.9167 表 2 人工感官审评与在线检测分级结果
Table 2. Grading results of artificial sensory evaluation and online check
茶叶品种 茶叶等级 份数 检测结果 判别率(%) 一级 二级 三级 四级 婺源仙枝绿茶 一级 18 17 1 0 0 93.30 二级 18 1 17 0 0 三级 12 0 0 10 2 四级 12 0 0 0 12 碧螺春绿茶 一级 12 12 0 0 0 98.30 二级 12 1 11 0 0 三级 18 0 0 18 0 四级 18 0 0 0 18 -
[1] 欧伊伶, 张娅楠, 覃丽, 等. 茶叶色香味品质评价方法研究进展[J]. 食品工业科技,2019,40(6):342−347, 360. [2] 温立香, 张芬, 何梅珍, 等. 茶叶品质评价技术的研究现状[J]. 食品研究与开发,2018,39(15):197−204. doi: 10.3969/j.issn.1005-6521.2018.15.038 [3] Liu C, Lu W, Gao B, et al. Rapid identification of chrysanthemum teas by computer vision and deep learning[J]. Food Science & Nutrition,2020,8(4):1968−1977. [4] Bakhshipour A, Zareiforoush H, Bagheri I. Application of decision trees and fuzzy inference system for quality classification and modeling of black and green tea based on visual features[J]. Journal of Food Measurement and Characterization,2020,14(9):1−15. [5] 董春旺, 朱宏凯, 周小芬, 等. 基于机器视觉和工艺参数的针芽形绿茶外形品质评价[J]. 农业机械学报,2017,48(9):38−45. doi: 10.6041/j.issn.1000-1298.2017.09.005 [6] Wang S H, Phillips P, Liu A J, et al. Tea category identification using computer vision andgeneralized eigenvalue proximal SVM[J]. Fundamenta Informaticae,2017,151(1-4):325−339. doi: 10.3233/FI-2017-1495 [7] Laddi A, Shashi S, Kumar A, et al. Classification of tea grains based upon image texture feature analysis under different illumination conditions[J]. Journal of Food Engineering,2013,115(2):226−231. doi: 10.1016/j.jfoodeng.2012.10.018 [8] 董春旺, 梁高震, 安霆, 等. 红茶感官品质及成分近红外光谱快速检测模型建立[J]. 农业工程学报,2018,34(24):306−313. doi: 10.11975/j.issn.1002-6819.2018.24.037 [9] Ouyang Q, Liu Y, Chen Q S, et al. Intelligent evaluation ofcolor sensory quality of black tea by visible-near infraredspectroscopy technology: A comparison of spectra and colordata information[J]. Spectrochimica Acta Part A: Molecularand Biomolecular Spectroscopy,2017,180:91−96. doi: 10.1016/j.saa.2017.03.009 [10] Calixto R R, Neto L G P, Cavalcante T D S, et al. A computer vision model development for size and weight estimation of yellow melon in the Brazilian northeast[J]. Scientia Horticulturae,2019,256:108521. doi: 10.1016/j.scienta.2019.05.048 [11] Arthur Z da Costa, Hugo E H Figueroa, Juliana A Fracarolli. Computer vision based detection of external defects on tomatoes using deep learning[J]. Biosystems Engineering,2020,190:131−144. doi: 10.1016/j.biosystemseng.2019.12.003 [12] 杨祖彬, 曾莉红. 脐橙分选包装表面损伤识别算法设计研究[J]. 食品工业科技,2014,35(1):264−269. [13] 魏文松, 邢瑶瑶, 李永玉, 等. 适于餐厅与家庭的叶菜外部品质在线检测与分级系统[J]. 农业工程学报,2018,34(5):264−273. doi: 10.11975/j.issn.1002-6819.2018.05.035 [14] Baneh N M, Navid H, Kafashan J. Mechatronic components in apple sorting machines with computer vision[J]. Journal of Food Measurement and Characterization,2018,12(2):1135−1155. doi: 10.1007/s11694-018-9728-1 [15] 胡潇, 熊爱华, 黄俊士, 等. 计算机视觉结合引导滤波方法快速量化茶叶叶底品质[J]. 江西农业大学报,2019,41(3):601−609. [16] 余洪, 吴瑞梅, 艾施荣, 等. 基于PCA-PSO-LSSVM的茶叶品质计算机视觉分级研究[J]. 激光杂志,2017,38(1):51−54. [17] 刘鹏, 吴瑞梅, 杨普香, 等. 基于计算机视觉技术的茶叶品质随机森林感官评价方研究[J]. 光谱学与光谱分析,2019,39(1):193−198. [18] 赵改名, 焦阳阳, 祝超智, 等. 基于极差分析法与主成分分析法研究新型牛肉薄饼加工工艺[J]. 现代食品科技,2019,35(11):144−151. [19] Zhang Y H, Deng X Y, Zhou X, et al. Yachine with kernel principal component analysis based on acoustic signals[J]. International Journal of Watermelon Ripeness Detection via Extreme Learning Mttern Recognition and Artificial Intelligence,2019,33(8):17. [20] Song B , Baik D K. A facial expression recognition algorithm with supervised orthogonal locality preserving projection[J]. Journal of Computational and Theoretical Nanoscience,2016,13(11):8495−8504. doi: 10.1166/jctn.2016.6003 [21] 郭金玉, 仲璐璐, 李元. 基于统计差分LPP的多模态间歇过程故障检测[J]. 计算机应用研究,2019,36(1):123−126. [22] 张善文, 张传雷, 程雷. 基于监督正交局部保持映射的植物叶片图像分类方法[J]. 农业工程学报,2013,29(5):125−131. [23] 卢维学, 吴和成, 万里洋. 基于融合随机森林算法的PLS对降水量的预测[J]. 统计与决策,2020,36(18):27−31. [24] 刘鹏, 艾施荣, 杨普香, 等. 非线性流形降维方法结合近红外光谱技术快速鉴别不同海拔的茶叶[J]. 茶叶科学,2019,39(6):715−722. doi: 10.3969/j.issn.1000-369X.2019.06.011 [25] Liu P, Wen Y, Huang J, et al. A novel strategy of near-infrared spectroscopy dimensionality reduction for discrimination of grades, varieties and origins of green tea[J]. Vibrational Spectroscopy,2019,105:102984. doi: 10.1016/j.vibspec.2019.102984 -