节点文献
速冻食品异物检测与剔除技术研究
【作者】 王强;
【导师】 武凯;
【作者基本信息】 南京理工大学 , 机械工程(专业学位), 2019, 硕士
【摘要】 速冻食品因具有新鲜、卫生、营养合理、食用方便等优点,深受人们的喜爱;其中具有“中国特色”的速冻水饺更是深受国内外市场的欢迎,产量迅速增加;然而近年来因金属、石头、玻璃等异物引发的食品安全事件,严重损害了消费者的身心健康,因此,对速冻食品进行异物检测以保证食品安全具有重要意义。针对金属检测机只能检测金属、检测结果无法直观可视的现状,本文使用X射线成像技术和图像处理技术对水饺中的金属钢球、细铁丝、螺钉、石头和玻璃5种异物进行自动检测与分类。主要研究内容包括:(1)分析了X射线成像过程及检测原理,并设计了一种旋转滚轮剔除装置对异物水饺进行剔除;针对原始的X射线水饺图像含有大量噪声和对比度低的问题,使用均值滤波、中值滤波、双边滤波等滤波器,以及对数变换、伽马变换、对比度拉伸变换等方法对原始水饺图像进行去噪和增强处理。根据MSE、PSNR和SSIM值对处理后的图像质量进行评价,最后选择3×3的中值滤波器和对比度拉伸变换作为本文的预处理方法。(2)根据X射线水饺图像的分布特点以及几种常规分割算法无法有效地分割出水饺中异物的缺点,提出一种附加偏移量的最大熵算法与线性递减权重的粒子群算法结合的阈值分割算法:把图像目标区域的熵附加一个偏移函数,将水饺图像的总熵作为粒子群算法的适应度函数来获取图像的最佳分割阈值。实验结果表明,本文算法可以有效地将不同异物从水饺图像中分割出来,且求解速度快。(3)提取图像的LBP、HOG和Gabor纹理特征,使用SVM对异物和无异物水饺图像进行识别;为了进一步提高水饺图像的识别率,提出一种改进的基于LeNet-5卷积神经网络模型(CNN)的异物水饺识别方法:在网络结构的设计中加入批量归一化层和Dropout层,以此来提高网络学习速度,避免网络过度拟合,并采用Softmax线性回归分类器,以ReLu为激活函数、Max-Pooling为下采样方法,对设计的CNN模型进行优化、训练和验证;为了方便后期水饺的二次处理,提取水饺二值图像中异物的圆度、长宽比、偏心率,以及水饺灰度图像中异物最小外接矩形区域的灰度均值、熵、灰度不变矩和LBP等特征作,使用BP神经网络对异物进行分类。(4)开发了一套基于MATLAB的X射线盒装水饺检测系统,实现了水饺图像的处理、分析和异物自动识别的功能。本文将X射线检测技术应用于盒装水饺中的异物检测,能够成功地识别出水饺中的各种异物,这对保障食品安全具有重要的现实意义。
【Abstract】 Quick-frozen food is popular because of its advantages of freshness,hygiene,reasonable nutrition and convenient eating.Quick-frozen dumplings with Chinese characteristics are welcomed by the domestic and foreign markets,and the output is increasing rapidly.However,in recent years,food safety incidents caused by foreign materials such as metal,stone and glass have seriously damaged consumers’ pysical and mental health.Therefore,foreign body detection of frozen food is of great significance to ensure food safety.In view of the fact that metal detectors can only detect metals and the results can not be visualized intuitively,this paper used X-ray imaging technology and image processing technology to automatically detect and classify five foreign bodies in dumplings,including metal balls,fine wires,screws,stones and glass.The main research contents include:(1)The X-ray imaging process and detection principle were analyzed,and a rotating roller eliminating device was designed to eliminate foreign body dumplings.In view of the fact that the original X-ray dumpling image contains a lot of noise and low contrast,we used mean filtering,median filtering,bilateral filtering,logarithmic transformation,gamma transformation,contrast stretching transformation to denoise and enhance the original image.According to the MSE,PSNR and SSIM values,the processed image quality is evaluated.We finally chose 3×3 median filter and contrast stretch transformation as the preprocessing method in this paper.(2)According to the distribution characteristics of X-ray dumpling images and the problem that several conventional segmentation algorithms can not effectively segment foreign bodies in dumplings,a threshold segmentation algorithm combining the maximum entropy algorithm with additional offset and the particle swarm optimization algorithm with linear decreasing weight was proposed: an offset function was added to the entropy of the image target area,and the total entropy of the dumpling image was used as the fitness function of the particle swarm algorithm to obtain the optimal segmentation threshold of the image.The experimental results showed that the proposed algorithm can effectively segment different foreign objects from the dumpling image and solve the problem quickly.(3)The LBP,HOG and Gabor texture features of the image were extracted and SVM was used to identify foreign and non-foreign dumplings.To further improve the recognition rate of foreign dumplings,an improved foreign dumpling recognition method based on LeNet-5 convolutional neural network model(CNN)was proposed: the batch normalization layer and the Dropout layer was added to in the design of the network structure to improve the network learning speed and avoid over-fitting of the network,and Softmax linear regression classifier,ReLu as activation function and Max-Pooling as downsampling method are used to optimize,train and validate the designed CNN model;In order to facilitate the second processing of dumplings,the roundness,aspect ratio,eccentricity of the foreign object in the binary image of the dumplings,and the gray mean,entropy,the gray invariant moments,the LBP features of the minimum cir-cumscribed rectangular area of the foreign bodies in the gray image were extracted to construct feature vectors,and then used BP neural network to classify foreign bodies.(4)A set of X-ray boxed dumpling detection system based on MATLAB was developed.The system realized the basic functions of image processing and analysis and the automatic judgment function of foreign objects.In this paper,X-ray detection technology is applied to detect foreign bodies in boxed dumplings,which can successfully identify various foreign bodies in dumplings,which has important practical significance for ensuring food safety.
【Key words】 Food safety; X-ray; dumpling; foreign body recognition; image segmentation; SVM; CNN; BP neural network;