| PET cap has a widespread application in the field of beverage, its quality directly influences the manufactured product. At present, cap inspection equipment mainly reply on bringing the techniques and products abroad, lacking proprietary intellectual property rights. No domestic inspection equipment developed that can be applied to bottle inspection. The paper has proposed a PC-based cap inspection algorithm and implementation framework by considering the current situation in market and high demand from enterprises and by analyzing the embedded machine vision products. On VC6.0 a new software on cap inspection has been developed and successfully applied to production line on enterprises. Defect types include starved edge, trimming, deformation, heterochrosis, black spots, etc,. The machine can select out more than 36 thousand defected caps one hour, with precision above 99% and inspection requirements meet.By considering the false distinction about the trimming parts connecting caps, the paper has proposed a new algorithm based on location matching and threshold segmentation. Firstly, locate the center of circle of the trimming defects by using Hough transform. Position of circle center can precisely remove the interference imposed from the connecting caps. As to the dead zone in inspecting starved parts when single camera applied to grab image for the caps with vertical position, the study has presented a new inspection method of multi-camera fusion. Defects like starved edge can be discerned by dividing the cap regions into angles starting from its center and into several sectors, and then calculating area difference of each sector. In dealing with heterochrosis, the paper distinguishes heterochrosis by calculating even value of H and S in HSV space as well as processing the black spots via threshold value. Experiments has proved the validity of the algorithms and methods proposed in the paper.The study has proposed a PC-based cap inspection system and fast cap region locating algorithm. Numerical features of different defects has been detected in this way. All algorithms have been implemented on VC6.0 with Halcon library introduced. |