节点文献

基于机器视觉的大豆品质的研究

Analysis of the Soybean Qualities Based on Machine Vision Technology

【作者】 时玉强

【导师】 郑先哲;

【作者基本信息】 东北农业大学 , 粮食、油脂及植物蛋白工程, 2009, 硕士

【摘要】 目前,采用机器视觉技术检测食品及农产品的品质正逐步推广应用。大豆作为一种重要的农产品,日益受到人们的重视,但是目前对大豆品质的检测、分级仍然停留在人工水平上。因此应用机器视觉技术对大豆进行品质检测有着重要的意义。本研究构建了基于计算机视觉的大豆检测系统:首先选择大豆图像预处理算法,然后提取大豆的形状和颜色特征,最后利用提取的大豆特征,基于MATLAB构建神经网络对大豆品质检测做了初步探索。得到以下结论:1.在本研究条件下,对光源的照明方式进行试验得到,在前向光源下能够有效地得到大豆的绝大部分外观特征。在相同的光源与照明方式下,选用红色、蓝色、黄色、黑色和白色的背景,以相同的二值分割参数进行试验,得到以黑色为背景进行分析效果最佳。对传统的图像算法进行分析和比较,包括图像滤波,边缘检测等,得到中值滤波能够明显的降低大豆图像的噪声,在灰度值变化较小的情况下,降低了图像边界部分的模糊程度,有良好的平滑效果。对黏连籽粒,应用基于形态学的二值分割方法和分水岭分割方法进行对比分析,发现应用分水岭方法得到的黏连分割图像的效果良好。应用双峰法与生长法相结合的算法,实现了背景与目标豆粒的分离,并且除去大部分噪声,进而分离得到单个分离的豆粒。从而获得了目标图像。2.定义并提取了大豆种子29个形态特征,可以同时对图像中多个大豆籽粒进行特征提取,大大提高了大豆特征提取的效率。根据BP人工神经网络的结构特点和网络参数设计要求,设计了面向MATLAB的BP神经网络。对比各种算法得到,Levenberg-Marquardt算法函数为各层之间的优化函数。对于单种缺陷的网络隐含层设为10,多种缺陷的网络设为23。3.优化特征选择,应用SAS分析软件对29个特征进行LOGISTIC和CORR分析,根据检测要求选择特征指标。结果表明,神经网络对于识别单种缺陷有很好的检验能力,其中对未成熟的检测率达到了100%,而对其它的缺陷中标准粒的检出也达到了95%以上;相对来说对缺陷粒的检出较差,但其中对于检出率最差的破碎粒的检出率也达到了81%。对于一次性识别多项豆粒缺陷的研究,10特征值的网络能够很好的区分标准粒和缺陷粒,标准豆粒的识别率为99%,未能确定是否良好的比率为1%;把虫蚀、霉变、破碎、未成熟和菌斑五种影响大豆品质的豆粒误检为标准大豆的比率为0.2%。对虫蚀、霉变、破碎、未成熟和菌斑的识别率分别为40%、51%、42%、96%、87%。4.经过SAS回归分析,得到了外观与营养品质的数学方程。经过回归分析得到蛋白质与长宽比、似圆度、G标准差、B标准差的回归方程:脂肪与面积、H均值、H标准差的回归方程为:其中x1为面积, x1 5为H均值, x1 8为H标准差。

【Abstract】 In recent years, machine vision technology has been developed in all sectors rapidly. Particularly, its superiority in the detection of food and agricultural products is outstanding. Soybean as a major agricultural product has provoked an increasing emphasis. However, the detection of soybean, classification remains at a level of artificial. Therefore, application of machine vision technology to detect soybean quality is of important significance.In this study, soybean feature extraction system was constructed based on machine vision. Firstly, choosing image pre-processing algorithm. Secondly, extracting soybean shape and color characteristics. Finally, using soybean features to construct neural network and detecting soybean quality as a preliminary exploration. The main conclusions were obtained as following.1. In this study conditions, lighting way was checked out through testing different ways. Finally, forward light source was selected. In the same light source and lighting way, black background was selected from white, blue, red, yellow, black ones. Series of image preprocessing, such as transformations geometric, color-transformation, image enhancement, morphological processing, and image segmentation and so on, were analyzed and compared. Median filter could significantly lower soybeans image noises. In the case of grey-scale changes in small value, well smoothing effect could be achieved. Compared to morphology algorithm, watershed algorithm could achieve better effect. Application of bimodal algorithm and growth algorithm combining algorithm, background and objective beans were separated, removed most of the noises, and single beans was obtained. Then objective image was obtained.2. 29 morphology features of soybean were defined and extracted. The algorithm could extract multiple features of soybeans at the same time; the efficiency of soybeans feature extraction has been greatly improved. Structural characteristics and design parameter of BP artificial neural network were analyzed. BP artificial neural network structure of was designed using MATLAB software. Compared with kinds of optimization functions by experimental analysis, Levenberg-Marquardt function was selected as training parameter. Nodal points of hidden layer were selected to be 10 for one kind of defective soybeans detecting, which was selected to be 23 for all kinds of defective soybeans detecting.3. Feature Selection Optimized. 29 characteristics were analyzed with LOGISTIC Regression and CORR analytical methods using SAS software. According to different requirements, different feature were selected .In terms of training results it was known that the effect of defective identification by the method of neural network was good to respectively detect different defects. The rate of immature beans detection was 100%, and others were above 95%, except broken was 81%. In one-time identification of a number of defective beans study, after SAS analyzing, 10 features were obtained to construct neural network to do the detection. The good one’s detection rate was 99%, and the rate of mistaking good ones for defect ones was 1%. The detection rate of moth-eaten beans, mildew beans, broken beans, immature beans and beans with spots caused by Bacteria were 40%,51%,42%,96%,87%,respectively. The rate of mistaking defect ones for good ones was 0.2%.4. Based on regression analysis, using SAS, Mathematical equations between appearance and nutritional quality had been developed as following: Protein: x1 0, x1 2, x 25, x 26 were aspect ratio, roundness likeness, Standard deviation, B Standard deviation, respectively. Oil: x1 , x1 5, x1 8 were area average value Standard deviation, respectively.

节点文献中: