During the machine vision inspection of the inner section of bottle caps within pharmaceutical packaging, the unique conca bottom and convex side walls often create obstructions to the illumination. Consequently, this results in challenges such as irregular background and diminished feature contrast in the image, ultimately leading to the misidentification of defects. As a solution, a vision system characterized by a Low-Angle and Large Divergence Angle (LALDA) is presented in this paper. Using the large divergence angle of LED, combined with low-angle illumination, a uniform image of the side wall region with bright-field characteristics and a uniform image of inner circle region at the bottom with dark-field characteristics are obtained, thus solving the problems of light being obscured and brightness overexposure of the background. Based on the imaging characteristics of LALDA, a multi-channel segmentation (MCS) algorithm is designed. The HSV color space has been transformed, and the image is automatically segmented into multiple sub-regions by mutual calculation of different channels. Further, image homogenization and enhancement are used to eliminate fluctuations in the background and to enhance the contrast of defects. In addition, a variety of defect extraction methods are designed based on the imaging characteristics of different sub-regions, which can avoid the problem of over-segmentation in detection. In this paper, the LALDA is applied to the defect detection inside the cap of capsule medicine bottle, the detection speed is better than 400 pcs/min and the detection accuracy is better than 95%, which can meet the actual production line capacity and detection requirements.
Read full abstract