高速生产线运动引起PET瓶的瓶体倾斜、压盖时产生的毛刺以及清洗瓶身残留的水珠,大大影响了现有瓶盖检测算法的准确率.针对上述问题,提出了一种结合对称匹配的实时PET瓶瓶盖检测算法.根据PET瓶瓶体的对称性,通过寻找瓶体图像水平翻转前后的变换关系得到配准矩阵,精确定位出PET瓶的对称轴.该算法能够补偿瓶体倾斜,并利用对称轴两侧点的相关性消除毛刺和水珠的影响,完成PET瓶持胚环的检测和瓶盖的分类.实验证明该算法精度高,速度快,鲁棒性好.在当前主流的硬件配置下,对于640×480图像的整体检测速度为27.4ms/帧,能够满足生产线的实时检测需求.
On a high-speed production line, tilt of bottles, burrs on the bottleneck, and residual droplets after cleaning affect accuracy of PET bottle inspection. To deal with the problem, a bottle detection algorithm based on symmetry matching is proposed. Considering symmetry of the bottle image, the bottle axis can be determined accurately by registering the images before and after horizontal flipping. Thus tilts can be compensated. Burrs and droplets are eliminated by using correlation of pixels on both sides of the axis. Consequently, the support rings can be detected and bottle caps can be classified precisely. Experimental results show high accuracy, speed and robustness of the proposed algorithm as compared with the state-of-the- art techniques. For images sized 640~480, the average detection time is 27.4 ms, which meets the requirement of high-speed production lines.