Visual Inspection Technology for PET Bottle Cap Defects: From Principles to Industrial Applications

2025/10/23 12:09


On high-speed beverage production lines, the seal quality of every bottle cap is crucial to food safety and corporate reputation. Visual inspection technology, enabling machines to "see" subtle defects in bottle caps, has become a critical component of modern industrial quality control.

PET bottles are ubiquitous in fast-moving consumer goods (FMCG) industries, such as beverages and pharmaceuticals. As a core component of packaging and sealing, the quality of the bottle cap directly impacts the safety and quality of the contents. Traditional bottle cap defect detection relies primarily on manual visual inspection, which suffers from low efficiency, high labor intensity, and a high rate of missed inspections.

The latest bottle cap compression molding technology enables PET bottle cap production speeds of 24,000-48,000 units per hour. However, high production speeds increase the probability of defects.

Machine vision-based PET bottle cap defect detection technology has emerged as a key technical tool for ensuring product quality.

I. Common Types of PET Bottle Cap Defects and Their Impacts

PET bottle cap defects vary widely and can be categorized into the following categories based on their form and location:

Appearance defects primarily include overall cap deformation, edge dents, stains, and nicks. These defects not only affect the product's appearance but may also compromise its sealing performance. For example, overall deformation of the bottle cap can lead to a loose fit with the bottle finish, potentially causing leakage or gas exchange.

Sealing defects such as a crooked cap, a high cap, or a missing cap directly impact the integrity of the package. A crooked cap can create a gap between the cap and the bottle finish, potentially leading to liquid leakage or gas ingress; a high cap indicates that the cap is not fully tightened, also impacting the seal.

Structural defects include excessive width of the anti-theft ring and a broken connecting bridge. Complete or partial breakage of the connecting bridge in the anti-theft ring can compromise the product's safety and prevent it from functioning properly.

Neck-related defects include bottle finish flash, poor internal finish molding, and abnormal locking ring platform diameter. These defects arise from issues with the preform production or blow molding process but can directly impact the sealing performance of the bottle cap. For example, excessive bottle finish flash can interfere with the outer stopper of the cap, compromising the seal; while flash on the threads can hinder screwing on the cap and easily lead to crooked caps. 

Table 1: Common Defect Types and Impacts of PET Bottle Caps

Common Defect Types and Impacts of PET Bottle Caps.png

II. Components of a PET Bottle Cap Visual Inspection System

A complete PET bottle cap visual inspection system typically consists of three main components: an image acquisition unit, an image processing unit, and an execution control unit.

1. Image Acquisition Unit

The image acquisition unit is the "eye" of the system, responsible for capturing clear images of the bottle cap. This unit typically includes components such as an LED light source, an industrial camera (CCD or CMOS), a lens, and an image acquisition card.

In terms of imaging solutions, backlight silhouette imaging is widely used, which can clearly capture the sample's outline information. To fully cover the cylindrical surface of the bottle cap, a multi-camera system is often used, such as a three-camera arrangement with a 120° angle between each camera, ensuring a complete image of the bottle cap's side without rotating the bottle.

Lighting design is crucial to image quality. Appropriate lighting can highlight target features and reduce interference from reflections and shadows. LED light sources are the preferred lighting method for vision systems due to their long life, excellent stability, and high customizability. 

2. Image Processing Unit

The image processing unit is the "brain" of the visual inspection system, responsible for analyzing and processing captured images and identifying defect features. This unit typically includes steps such as image preprocessing, feature extraction, and defect classification and identification.

During the image preprocessing stage, adaptive median filtering is often used to remove noise, iterative threshold segmentation is used for binarization, and the Canny operator is used for edge detection. These methods effectively extract the characteristic edges of the bottle cap, laying the foundation for subsequent defect identification.

For complex defect types, more advanced algorithms are required. For example, for detecting foreign objects on the bottle cap surface, the HSV color space can be used instead of the traditional RGB space to overcome the shortcomings of uneven grayscale on the bottle cap surface and unclear foreign object features. For subtle defects such as broken bridges, the dynamic threshold segmentation algorithm has shown good results. This algorithm uses mean filtering to obtain a background area, compares the image under inspection with the background, and sets a dynamic threshold to segment the broken area.

3. Execution Control Unit

The execution control unit is responsible for executing corresponding operations based on the processing results. It typically consists of a PLC (Programmable Logic Controller), a pneumatic rejection device, and a positioning system. When the system detects a defective product, it sends a signal to the PLC, which controls the solenoid valve to actuate the cylinder, removing the unqualified product from the production line. Advanced systems also include a positioning function that records the capping machine station corresponding to the defective product, providing accurate information for repair and adjustment.

Table 2: Typical Configuration of a PET Bottle Cap Visual Inspection System

Typical Configuration of a PET Bottle Cap Visual Inspection System.png

III. Key Detection Algorithms and Technological Innovations

The core technology of the PET bottle cap visual inspection system lies in image processing algorithms, and different defects require different detection methods.

1. Bottle Cap Positioning and Contour Extraction Algorithm

Bottle cap positioning is the first step in defect detection. Using Canny operator edge detection combined with 8-neighborhood contour extraction, the bottle cap's position in the image can be accurately determined. Subsequently, the least squares method is used to fit the cap top contour and support loop lines, calculating their relative position and angle, which serves as the basis for determining whether the cap is high or crooked.

2. Dedicated Detection Algorithm for Complex Defects

Conventional grayscale image processing is limited in its effectiveness for detecting foreign matter on the bottle cap surface. Research has shown that converting images from RGB space to HSV color space and utilizing the saturation component can effectively highlight foreign matter features and improve detection accuracy. For subtle defects like the partially broken connecting bridge of the anti-theft ring, the fixed threshold method struggles to effectively segment the product due to the small gap (0.2-0.3mm) and the abrupt grayscale distribution. The dynamic threshold segmentation algorithm, through background estimation and difference comparison, can accurately identify these subtle defects.

3. Hardware-Accelerated Processing Solutions

To meet the demands of high-speed production lines, some systems employ hardware acceleration solutions such as FPGAs (field-programmable gate arrays). For example, an inspection system based on a SoPC (system-on-a-chip) uses the EP2C35F6726C FPGA chip. Leveraging the hardware's parallel processing capabilities, it reduces processing time to approximately 90ms per bottle, significantly faster than software-based solutions (typically 2-3 bottles per second).

IV. Industrial Application Results and Technology Outlook

Visual inspection technology for PET bottle caps has been widely used in the beverage and pharmaceutical industries, achieving significant results.

1. Industrial Application Results

Actual applications have demonstrated that visual inspection systems can achieve over 99% detection accuracy and process over 12,000 bottles per hour, far exceeding the efficiency and accuracy of manual inspection. For example, a pharmaceutical factory's unsupported ring PET bottle cap inspection system achieves 99.97% accuracy for detecting normal caps and 99.20% accuracy for detecting foreign matter on the cap surface and broken rings. A visual inspection system developed by the Hangzhou Wahaha Group achieved 99.90% accuracy in actual production line testing, with a 100% defective product detection rate and a false rejection rate of only 0.08%.

2. Technology Development Trends

In the future, visual inspection technology for PET bottle caps will develop towards intelligent and integrated capabilities. Artificial intelligence and deep learning technologies are being introduced into the visual inspection field. Through convolution operations and small sample training, they generate inspection models more suitable for specific products, expand the inspection range, and improve equipment efficiency.

The combination of a cloud-based training and maintenance platform and edge computing technology enables the system to continuously optimize algorithms through remote updates while ensuring real-time performance. 3D visual inspection technologies, such as laser displacement systems, can detect bottle cap position with micron-level accuracy, providing richer three-dimensional information than 2D vision. V. Conclusion

Visual inspection technology for PET bottle cap defects has become an indispensable quality control tool in modern industrial production. From early simple photoelectric detection to today's multi-camera vision systems, and from traditional image processing algorithms to the introduction of artificial intelligence, this field has achieved remarkable progress.

With the advent of Industry 4.0, PET bottle cap visual inspection technology will become even more intelligent and networked. It will not only detect defects but also optimize production processes through data analysis and predictive maintenance, improving overall product quality and efficiency. In the future, with increased computing power and optimized algorithms, visual inspection systems will achieve new breakthroughs in accuracy, speed, and adaptability, providing more reliable quality control for the packaging industry.

For manufacturers, adopting advanced visual inspection systems is not only a means to improve product quality but also a key path to reducing production costs, enhancing brand image, and achieving intelligent manufacturing. As the technology becomes more widespread and costs decrease, visual inspection technology will be more widely used by small and medium-sized enterprises, driving continuous improvement in quality across the industry.