摘要
为提高颗粒状农产品分选精度,提出了一种基于现场可编程门阵列(FPGA)的k最近邻(k-NN)方法。该方法分两步:第一步对基于FPGA的彩色线阵CCD成像系统得到的图像在PC上进行保存,并对得到的图像进行特征提取,然后用k-NN方法对提取的特征进行特征筛选得到最优特征集。第二步将训练好的最优特征集放在FPGA的ROM上,FPGA对线阵CCD得到的图像数据实时提取特征与ROM上最优特征集做距离计算实现k-NN分选算法。对花生和开心果两种颗粒状农产品用该方法进行实验,以RGB颜色空间为主要特征,结果表明:在选择合理特征个数和k值情况下对花生和开心果的分选正确率都达到了95%以上。
In order to improve sorting precision of granular agricultural products,a k-nearest neighbor( k-NN)method based on FPGA is proposed. The method contains two steps: the first step,image obtained by FPGA-based color linear array CCD imaging system is saved on PC,and the obtained image is feature extracted,and then using k-NN method extracted features are screened and obtain the optinal feature set. The second step,trained the optimal feature set is put on FPGA-ROM,FPGA real-time extract characteristics of image data obtained by linear CCD on ROM and optimal feature set make distance calculation,achieve k-NN sorting algorithms. Two kinds of granular agricultural products,peanuts and pistachios,are tested by this method,RGB color space as main feature,the results show that under reasonable choice in the number and characteristics of the K-value situations,sorting correct rate of peanuts and pistachios reach above 95 %.
出处
《传感器与微系统》
CSCD
2016年第12期66-68,71,共4页
Transducer and Microsystem Technologies