使用3CCD高精度面阵相机采集新疆多个品种核桃RGB图像,设计一种自适应双阈值的Otsu法,快速、准确地分割出缺陷区域;基于分割区域的几何、纹理等20个初始特征,转换为新的9维特征向量集;以该特征集为输入,建立基于贝叶斯、BP神经网络与支持向量机的15个识别模型,对比评价其适应性,以及裂缝、碎壳、黑斑3类核桃外部缺陷的识别性能与时间。结果表明,基于径向基的支持向量机识别模型效果最好,对3类缺陷的验证集平均识别率分别为93.06%、88.31%、89.27%,对缺陷的总识别率为90.21%,平均识别时间为10-4 s级。研究成果能够用于今后核桃缺陷的在线检测与分级,同时也为坚果等其他作物品质的在线检测识别提供一定参考。
In the present study, based on the RGB images acquired using a 3-CCD high-precision area array camera for several varieties of walnuts in Xinjiang, we designed a self-adaptive double-threshold Otsu method which can rapidly and accurately segment the defective regions and transform 20 initial features including geometry and texture and other features to a 9-demensional set of eigenvectors. Using the set of eigenvectors as input, 15 recognition models were established based on Bayesian network, BP neural network(BPNN) and support vector machine(SVM), and their adaptability as well as identification performance and mean recognition time for 3 defects(crack, damage, and black spot) were compared. The results revealed that the SVM model based on radial basis function(RBF), showing a mean recognition time at the order of magnitude of 10-4 s, provided the best results, giving average test recognition accuracy of 93.06% for crack, 88.31% for damage, and 89.27% for black spot and total recognition rate of 90.21% for the 3 external defects. These results can provide useful data for on-line determination and classification of walnut detects and on-line quality identification of other nuts.