首页 | 本学科首页   官方微博 | 高级检索  
     

基于OpenCV的食品包装缺陷分割方法
引用本文:杨洋,项辉宇,冷崇杰,薛真. 基于OpenCV的食品包装缺陷分割方法[J]. 食品与机械, 2017, 33(7): 104-106,174
作者姓名:杨洋  项辉宇  冷崇杰  薛真
作者单位:北京工商大学材料与机械工程学院,北京 100048
摘    要:针对现有食品包装表面印刷缺陷分割算法中分割速度慢、精度低的问题,提出基于OpenCV实现图像差分与形态学处理结合的表面缺陷分割方法。分别对模版图像和待测图像进行高斯低通滤波运算;将预处理后的两幅图像作差分运算,得到其差分结果;采用形态学开运算来去除差分图像的噪声并标出目标缺陷位置。选取污点、飞墨、漏印3类缺陷样本各30组进行试验,结果表明:该法能够达到的平均准确率为91.51%,93.41%,94.14%,平均的分割时间仅为46.6ms。

关 键 词:食品包装;视觉检测;图像分割;OpenCV

Food packaging defect segmentation based OpenCV method
YANGYang,XIANGHuiyu,LENGChongjie,XUEZhen. Food packaging defect segmentation based OpenCV method[J]. Food and Machinery, 2017, 33(7): 104-106,174
Authors:YANGYang  XIANGHuiyu  LENGChongjie  XUEZhen
Affiliation:College of Material Science and Mechanical Engineering, Beijing Technology and Business University, Beijing 100048, China
Abstract:Assembly line detection more depend on the machine vision technology, and image segmentation is the key step in the detection. To solve the problem of slow speed and low accuracy of defects segmentation methods to the surface defects of food packing, proposed a segmenting method based on image difference and mathematical morphology in OpenCV. Firstly, compute the template image of the target image and filter them by a low pass filter. Secondly, differential operation is happened on the two pretreated images to obtain the differential image. Finally, using morphological opening operation to remove the noise on the difference image and get the position of defects image. In this paper, 30 groups of defect samples, such as stain, misting and stripping, were selected and the experimental results were recorded. The results showed that the average accuracies of the proposed method were 91.51%, 93.41%, 94.14%, respectively, and the average segmentation time was only 46.6 ms.
Keywords:food packaging   visual inspection   image segmentation   OpenCV
本文献已被 CNKI 等数据库收录!
点击此处可从《食品与机械》浏览原始摘要信息
点击此处可从《食品与机械》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号