引用本文: 马文强, 张漫, 李源, 李民赞, 杨莉玲, 朱占江, 崔宽波. 基于高光谱成像的核桃仁品质检测与分类方法. 分析化学, 2020, 48(12): 1737-1746. doi: 10.19756/j.issn.0253-3820.191289 [复制]
Citation: MA Wen-Qiang , ZHANG Man , LI Yuan , LI Min-Zan , YANG Li-Ling , ZHU Zhan-Jiang , CUI Kuan-Bo . Detection and Grading Method of Walnut Kernel Quality Based on Hyperspectral Image. Chinese Journal of Analytical Chemistry, 2020, 48(12): 1737-1746. doi: 10.19756/j.issn.0253-3820.191289 [复制]
基于高光谱成像的核桃仁品质检测与分类方法
Detection and Grading Method of Walnut Kernel Quality Based on Hyperspectral Image
采用光谱与图像相结合,实现了核桃仁蛋白质和脂肪含量预测及基于完整度和色泽的核桃仁外观品质分级。选用新疆”温185″核桃仁,采集了862.9~1704.02 nm和382.19~1026.66 nm范围高光谱图像。采用多元散射校正(MSE)和标准正态化(SNV)方法进行预处理后,通过竞争性自适应重加权采样算法与相关系数法,对核桃仁样品的蛋白质含量、脂肪含量、总色差3个参数进行了特征波段筛选。通过偏最小二乘回归(PLSR)算法建立了全光谱波段与特征光谱波段的蛋白质和脂肪含量预测模型,与全光谱波段相比,蛋白质含量特征波段预测模型的验证集决定系数(R2)由0.66增长到0.91,均方根误差(RMSEP)由1.37%下降到0.78%;脂肪含量特征波段预测模型的验证集R2由0.83增长到0.93,RMSEP由0.98%下降到0.47%。在外观品质方面,采用全光谱波段、RGB光谱波段、总色差特征光谱波段为输入,采用决策树、K近邻和支持向量机算法建立了核桃仁外观品质分类模型。通过对比发现,采用总色差特征波段建模,可大幅减低冗余信息的干扰,同时分类准确率也高于RGB波段;在光谱信息的基础上加入图像统计特征参数信息,能够进一步提升分类的准确率,当采用决策数算法建立的色泽分类模型时,模型具有最高的分类准确率(98.6%);分类算法方面,当输入变量数目较少时,决策树算法在分类准确率和速度方面都具有明显的优势。利用高光谱技术可以实现核桃仁内部品质检测与外观分级,为核桃仁品质无损检测的提供了新的理论依据。
Hyperspectral imaging technology enables rapid non-destructive inspection and grading of various agricultural products. In this work, the research on the quality detection method of walnut kernel based on hyperspectral image was carried out. The combination of spectrum and image information was used to realize the prediction of protein and fat content and the classification of the integrity and color of walnut kernel. The “Wen 185” walnuts, which were produced from Xinjiang, were shelled and prepared by different grades of integrity and color. Then the hyperspectral image of each sample was measured in the range of 862.9-1704.02 nm and 382.19-1026.66 nm by Gaia hyperspectral imager. After that, the color difference, fat content and protein content of samples were measured. Multivariate scatter correction and standard normalized variate were used to pre-processing the original spectral information. And the feature bands were screened by the method, which combined competitive adaptive re-weighting sampling (CARS) and correlation coefficient method (CCM ) algorithm, for the three parameters of protein content, fat content and total color difference of walnut kernel samples. Six feature bands related to protein content and 7 feature bands related to fat content were screened out. The internal quality parameter prediction model of the full spectrum band and the characteristic spectrum band were established by partial least squares regression (PLSR) algorithm. Compared with the full-spectrum band, the verification set coefficient (R2) of the feature band protein content prediction model increased from 0.66 to 0.91, and the mean square error (RMSEP) decreased from 1.37% to 0.78%. The verification set coefficient (R2) of the feature band fat content prediction model increased from 0.83 to 0.93, and the RMSEP decreased from 0.98% to 0.47%. It showed that the selected characteristic bands effectively reduced the complexity of the full spectrum information and improved the quality of modeling. In terms of appearance quality, the feature bands associating with the color difference were selected to be 402.5 and 689.2 nm. The full-spectral spectrum, RGB spectrum, characteristic spectrum and the combination of spectral and image information were used to establish the walnut appearance quality classification model by decision tree, K-nearest neighbor and support vector machine algorithm. It showed that the feature bands modeling greatly reduced the interference of redundant information, improved the modeling efficiency, and the classification accuracy were also significantly higher than the RGB bands by comparison. The adding image statistical feature parameter to the feature bands and RGB bands could further improve the accuracy of classification model which had the highest classification accuracy rate reached to 98.6% by decision tree algorithm. In terms of classification algorithm, the decision tree algorithm had obvious advantages in classification accuracy and calculation speed when the number of input variables was less. The used of hyperspectral technology could realize the internal quality detection and appearance classification of walnut kernels, which provided a new theoretical basis for the application of non-destructive testing of walnut kernel quality.