PET Bottle Full-Bottle Visual Inspection Technology: System Composition, Algorithm Principles, and Development Trends

2025/12/09 16:46

1. Importance and Background of Full-Bottle Inspection for PET Bottles


PET bottles are widely used packaging containers in the beverage, food, and pharmaceutical industries. On high-speed filling production lines, defects such as excessively high or low liquid levels, and substandard cap sealing may occur due to factors such as filling equipment errors, bottle variations, or production line fluctuations. Excessively high liquid levels may cause the product to expand or even burst during transportation or temperature changes, while excessively low liquid levels may violate label specifications, affecting the company's image and incurring regulatory risks. Cap defects such as high caps, crooked caps, missing caps, or broken tamper-evident rings can easily lead to liquid leakage or microbial contamination. Therefore, automated quality inspection of full-bottle bottles at the end of the production line has become a crucial step in ensuring the quality of outgoing products.


Traditional inspection mainly relies on manual visual inspection, but this method is inefficient, prone to fatigue, and susceptible to subjective factors, making it unsuitable for high-speed production lines carrying tens of thousands of bottles per hour. X-ray inspection, ultrasonic inspection, and infrared inspection technologies have also been used, but each has its own problems, such as health risks, susceptibility to interference, or insufficient accuracy. In recent years, machine vision-based full-bottle inspection technology has gradually become the mainstream solution due to its advantages of non-contact operation, high precision, and high speed. This technology captures images of the bottle with a camera and uses image processing algorithms to analyze key indicators such as liquid level, cap, and label, achieving rapid and objective online quality judgment.


2. Composition of a PET Bottle Full-Bottle Visual Inspection System


A complete PET bottle full-bottle visual inspection system typically consists of an imaging unit, a light source, a processing unit, and an actuator. These components must work together to meet the requirements of high-speed and high-precision inspection.


2.1 Imaging Unit


The imaging unit is responsible for acquiring images of the bottle. Its core component is an industrial camera (such as a CCD or CMOS type). To improve inspection coverage, the system often uses multiple cameras or combines them with reflectors to capture images simultaneously from different angles. For example, a typical solution uses three area-array CCD cameras, spaced 120 degrees apart along the production line, to achieve 360-degree blind-spot-free detection of the bottle cap and liquid level. Another innovative solution uses only one industrial CCD camera, but with five reflective mirrors (including the first to fifth mirrors), acquiring multi-angle images of the front, left, right, and top of the bottle through mirror reflection, effectively reducing system cost and complexity. The camera lens is usually flush with the bottom of the bottle to ensure clear imaging of the liquid level line.


2.2 Light Source System


Stable illumination is crucial for image quality. The system often uses LED area light sources or ring light sources to highlight the bottle edges and liquid level contours. The light source is usually set to constant-on mode, requiring no complex controller and offering high stability. Depending on the bottle characteristics (such as transparency and contents color), backlighting (illuminating from behind the bottle to create a silhouette to highlight the liquid level line) or front lighting (illuminating from the front of the bottle to enhance surface details) can be selected. For example, when inspecting bottle caps, backlighting helps capture the contours of the cap and support ring, while in liquid level detection, combining front and backlighting effectively compensates for interference caused by foam. The light source layout must avoid reflections and shadows and adapt to the vibration environment of the production line.


2.3 Processing Unit and Actuator


The processing unit (such as an industrial control computer) runs image processing algorithms to analyze the captured images and determine whether the liquid level is acceptable and whether the bottle cap is normal. This unit communicates with the PLC control unit, which controls the rejection mechanism (such as a solenoid valve-driven ejector) based on the detection results to automatically remove defective products from the production line. The system also integrates photoelectric sensors, rotary encoders, and other components to track the bottle position and trigger the camera to take pictures, ensuring that the detection is synchronized with the production line speed.


3. Key Algorithms in Full Bottle Detection


Algorithms are the core of visual inspection and must meet high accuracy and real-time requirements. The following are typical algorithms for liquid level detection and bottle cap detection.


3.1 Liquid Level Detection Algorithm


The goal of liquid level detection is to accurately identify the boundary between liquid and gas (or foam) inside the bottle. Mainstream algorithms include the projection gradient method and the grayscale projection gradient diffusion method. Their process typically involves three steps: image preprocessing, liquid level localization, and judgment.


• Image Preprocessing: First, the color image is converted to grayscale, then binarized (the threshold is usually set to around 200 for a 256-level grayscale image) to separate the bottle from the background. For the binarized image, noise can be removed through operations such as erosion and dilation, and the bottle area can be coarsely located using connected component analysis.


• Liquid Level Localization: The projection gradient method is commonly used. First, the sum of grayscale values for each row along the vertical direction of the image is calculated to form a projection curve. Due to the abrupt change in grayscale at the liquid level, the projection gradient value will increase significantly. By scanning the gradient curve, the row containing the maximum gradient value can be found, thus determining the liquid level position. To improve accuracy, a gradient diffusion strategy can be combined to enhance the gradient signal using prior liquid level characteristics, making the localization more stable. Experiments show that the liquid level localization error of this method can be controlled within 0.68 mm, and the processing time for a single frame is approximately 23.8 ms, meeting the requirements of high-speed imaging. For multi-angle images (such as left and right views obtained through a mirror), the system calculates the liquid level position separately. If both are within the standard range, it is considered合格 (qualified); if one is too high, too low, or the liquid level cannot be detected (e.g., in a full bottle), it is considered不合格 (unqualified).


3.2 Bottle Cap Detection Algorithm


Bottle cap detection needs to identify defects such as high caps, tilted caps, no caps, and broken tamper-evident rings. Algorithms are mostly based on the geometric relationship between the bottle cap and the support ring.


• Symmetry Axis Location: First, edge detection is performed on the bottle image. The bottle's symmetry axis is determined by fitting left and right contour points to correct the bottle's tilt.


• Support Ring Location: The support ring (adapter ring) is relatively fixed to the bottle body and appears as a straight line in the image. The support ring can be located by counting the number of black pixels in each row and finding the peak row; or by using corner detection, the two endpoints of the support ring are determined by the maximum point of contour curvature, and then a straight line is fitted.


• Defect Judgment: Based on a straight line fitting algorithm, the slope and distance between the straight line at the top of the bottle cap and the straight line of the support ring are calculated. If the slope difference between two straight lines exceeds a threshold (e.g., 0.005), it is judged as a crooked cap; if the slopes are parallel but the distance exceeds the calibration range (e.g., 20 pixels), it is judged as a high cap; if the cap area cannot be detected, it is considered a capless bottle. For broken tamper-evident rings, the gap between the support ring and the tamper-evident ring can be detected: if there is no gap, it indicates that the tamper-evident ring may be broken or detached. This type of algorithm has an accuracy of over 99% and a processing speed of 100 ms/image.


4. Integration of Inspection Process with Production Line


The full-bottle inspection station is usually set after filling and capping but before labeling and packaging. The inspection process is as follows:


1. Trigger Acquisition: The bottle enters the inspection station via a conveyor belt. The photoelectric sensor triggers the camera and light source to simultaneously acquire multi-angle images.


2. Image Processing: The industrial control computer runs the algorithm to extract liquid level and cap features.


3. Result Judgment and Execution: The system outputs a "pass/fail" signal based on whether the liquid level is within the standard range and whether the cap is qualified. After receiving the signal, the PLC control unit promptly removes defective bottles at the rejection station using a ejector.


The system needs to adapt to high-speed production lines (up to 36,000 bottles/hour), therefore, algorithm efficiency and hardware synchronization performance are crucial. Furthermore, to cope with interference from bottle shaking, water droplets, and glare, the algorithm needs to incorporate robust design, such as using multi-rectangular box cascading judgment and image filtering strategies.


5. Industry Applications and Development Trends


Visual inspection technology has been widely applied to PET packaging production lines in the beverage, beer, and pharmaceutical industries. As shown in Figure 2, a typical filling line integrates multiple inspection systems at key stations: pre-filled bottle inspection before blowing (checking for defects at the mouth, shoulder, and bottom), full-bottle inspection after filling (liquid level, cap, and coding), label inspection after labeling (mislabeling, damage, and warped corners), and packing inspection after packaging (missing bottles, weight verification). This end-to-end quality monitoring system significantly improves production automation and product consistency.


Future development trends include:


• Intelligent Algorithms: Integrating deep learning technology to train models that identify complex defects (such as label printing errors or minor bottle damage), improving system adaptability and accuracy.


• Multi-Sensor Fusion: Combining weight sensors, near-infrared spectroscopy, etc., to monitor internal quality such as contents quality and impurities while detecting liquid levels and bottle caps.


• Flexible Design: Equipment needs to support rapid production changeover, adapting to the detection needs of different bottle types and liquids through adjustable light sources, camera brackets, and parametric software.


• Cost Optimization: Developing single-camera multi-angle imaging solutions (such as mirror combination systems) to reduce hardware costs while ensuring performance, promoting the technology's adoption by SMEs.


6. Summary


PET bottle full-bottle visual inspection technology, through advanced imaging systems and efficient algorithms, achieves online automated detection of key quality aspects such as liquid levels and bottle caps, effectively replacing traditional manual inspection, ensuring product quality, and improving production efficiency. With the advancement of machine vision and artificial intelligence technologies, future systems will evolve towards higher precision, faster speed, and stronger adaptability, providing key technological support for the intelligent upgrading of industries such as beverages, food, and pharmaceuticals.


Related Products

x