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.
Publication Date
7-28-2017
First Page
104
Last Page
106,174
DOI
10.13652/j.issn.1003-5788.2017.07.024
Recommended Citation
Yang, YANG; Huiyu, XIANG; Chongjie, LENG; and Zhen, XUE
(2017)
"Food packaging defect segmentation based OpenCV method,"
Food and Machinery: Vol. 33:
Iss.
7, Article 24.
DOI: 10.13652/j.issn.1003-5788.2017.07.024
Available at:
https://www.ifoodmm.cn/journal/vol33/iss7/24
References
[1] 龙建武, 申铉京, 陈海鹏. 自适应最小误差阈值分割算法[J]. 自动化学报, 2012, 38(7): 1 134-1 144.
[2] 徐少平, 刘小平, 李春泉, 等. 基于区域最大相似度的快速图像分割算法[J]. 光电子·激光, 2013(5): 990-998.
[3] 卢夏衍, 李昕, 冉鹏, 等. 温室幼苗图像的多算法融合区域生长分割算法研究[J]. 中国农机化学报, 2016, 37(6): 89-93.
[4] KANG Chung-chia, WANG Wen-June, KANG Chung-hao. Image segmentation with complicated background by using seeded region growing[J]. AEU-International Journal of Electronics and Communications, 2012, 66(9): 767-771.
[5] 曹军, 许雷, 张怡卓, 等. 实木地板图像差分和形态学分割算法研究[J]. 安徽农业科学, 2013(28): 11 403-11 406.
[6] 贺振东, 王耀南, 刘洁, 等. 基于背景差分的高铁钢轨表面缺陷图像分割[J]. 仪器仪表学报, 2016, 37(3): 640-649.
[7] 胡敏, 蔡慧芬. 基于形态学标记连通的分水岭图像分割[J]. 电子测量与仪器学报, 2011, 25(10): 864-869.
[8] 杨慧斌, 闫娟. 基于LabVIEW的食品包装喷码视觉检测方法[J]. 食品与机械, 2016, 32(4): 123-126.
[9] 何小虎. 基于计算机视觉的啤酒瓶空瓶检测图像采集技术[J]. 食品与机械, 2016, 32(5): 105-107.
[10] 姒绍辉, 胡伏原, 顾亚军, 等. 一种基于不规则区域的高斯滤波去噪算法[J]. 计算机科学, 2014(11): 313-316.
[11] RAFAEL C Gonzalez, RICHARD E Woods. 数字图像处理[M]. 2版. 阮秋琦, 阮宇智, 译. 北京: 电子工业出版社, 2007.
[12] 杨单. 基于图像差分特征的彩色图像差分预测与信息提取算法研究[J]. 计算机科学, 2015(1): 308-311.
[13] 彭向前. 产品表面缺陷在线检测方法研究及系统实现[D]. 武汉: 华中科技大学, 2008: 45-48.
[14] 吴志川, 彭国华. 基于灰色聚类决策的图像分割性能评价[J]. 计算机工程与应用, 2012, 48(19): 197-200.