|
南京农业大学学报 2017
基于嵌入式Linux的便携式水果品质分级仪的设计与开发Keywords: 水果, 品质分级仪, 嵌入式, Linuxfruit, quality grading device, embedded, Linux Abstract: [目的]本文旨在开发一种针对水果品质分级的便携式设备。[方法]在软硬件协同设计的指导思想下,对系统进行整体设计,在ARM11嵌入式微处理器和Linux操作系统环境下,构建系统的硬件和软件;采用C/C++和Python混合编程,底层硬件使用C/C++开发驱动,参数提取、模式识别和用户界面使用Python进行开发,对基于嵌入式Linux的便携式水果品质分级仪进行设计与开发。[结果]该仪器主要包括控制模块、图像处理模块、模型预测模块;实现了对显示器、激光器和相机的控制,图像的采集和图像上特征参数的提取,包括颜色特征参数(R、G、B、H、S、I及各标准差)和纹理特征参数(像素面积、平均灰度值、灰度标准差、平滑度、三阶矩、一致性和熵),模型的选择,结果显示及存储等功能。完成了一种体积小、成本低、操作简单的水果品质分级仪的设计与开发。将‘湖景蜜露’水蜜桃和‘红富士’苹果的支持向量机(SVC)模型写入该仪器并验证,结果表明,‘湖景蜜露’和‘红富士’分级正确率分别为90%和92%。[结论]这种基于嵌入式Linux的便携式水果品质分级仪对水果品质分级具有可行性,对提高我国水果的综合利用率和在国际市场上的竞争力具有重要意义。[Objectives]This study is to develop a commercial grading device of fruit internal quality. [Methods]This study made the overall planning for the portable fruit quality grading device including hardware and software according to the guidance of hardware and software collaborative design. Hardware based on ARM11 embedded microprocessor and Linux operating system was developed and consisted of an ARM11 developed board,a semiconductor laser,a digital camera,a rechargeable battery and touch screen display. The semiconductor laser was used as a light source,and the light line was kept at an angle of 15° to the digital camera,which was used to collect laser scattering images of fruits. The software system of this device was developed modularly with C/C++ and Python language. C/C++ was used to develop the low-level hardware,while the Python was used to write the characteristic parameters extracting and pattern recognizing progress and user interface. The extracted characteristic parameters included color feature parameters (R,G,B,H,S,I and the standard difference)and texture feature parameters (pixel area,average gray value,gray standard deviation,smoothing,third order moment,consistency and entropy). The support vector classification (SVC)model to grade the ‘Hujingmilu’ peaches and ‘Honeydew Fuji’ was built by using the characteristic parameters as the input data and using the manual grading results as the output data. [Results]A small size,low cost and simple operation portable fruit quality grading device was developed. The size of the device was 215 mm×120 mm×120 mm,which can meet the requirements of the nondestructive testing. The software system mainly included control module,image processing module and model prediction module. Semiconductor laser control,scattering images capture,characteristic parameters extracting,pattern recognizing and results display and saving were realized. The support vector machine (SVC)models of ‘Hujingmilu’ and ‘Honeydew Fuji’ were programmed into the instrument. The overall testing classification accuracy rates of
|