Glass Bottle Defect Visual Inspection Technology: Principles, Applications, and Development Trends
1. Introduction: The Importance of Glass Bottle Defect Detection
Glass bottles, as traditional packaging containers, are widely used in the food, beverage, pharmaceutical, and cosmetic industries due to their excellent sealing, chemical stability, and recyclability. However, during the manufacturing, transportation, and reprocessing processes, various defects, such as cracks, bubbles, and uneven thickness, are inevitable. These defects not only affect the appearance but can also lead to safety hazards such as bottle explosions, endangering consumer safety and causing significant economic losses and brand risks for manufacturers. Therefore, efficient and accurate defect detection of glass bottles is an essential and critical step in the production process.
Traditional glass bottle defect detection relies primarily on manual visual inspection, a method that suffers from low efficiency, high labor intensity, high subjectivity, and fatigue. Especially on high-speed production lines, manual inspection can no longer meet the dual demands of quality and efficiency in modern industry. With the development of machine vision technology, computer vision-based glass bottle defect detection systems have emerged. By simulating human visual functions and combining optical, electronic, image processing, and computer technologies, these systems enable automated, high-precision, and efficient detection of glass bottle defects, significantly improving the automation level of production lines and the stability of product quality.
2 Types and Causes of Glass Bottle Defects
2.1 Common Defect Types and Classifications
Glass bottle defects can be categorized in various ways based on their location and nature. In terms of location, defects primarily occur in the bottle mouth, body, and bottom. Defects can be categorized into major and minor defects based on their severity. The following are common types of defects and their characteristics in glass bottles:
Table: Common Types of Defects and Characteristics in Glass Bottles
| Defect Type | Location | Characteristic Description | Severity |
| Cracks | Mouth, neck, body, bottom | Cracks of varying depths, some visible only in reflected light | High |
| Bubbles | Body, mouth seal | Clusters of bubbles or single large bubbles generated during the molding process | Medium-High |
| Thickness Uneven | Body | Uneven glass distribution, areas too thin or too thick | Medium |
| Deformation | Body, bottom | Collapsed or uneven bottom | Medium |
| Cold Spots | Bottle surface | Opaque patches caused by low mold temperature | Low |
| Wrinkles | Bottle surface | Creases or fine wrinkles of various shapes | Low |
| Scissor Marks | Mouth, bottom | Marks left by poor shearing, often the source of cracks | Medium |
2.2 Defect Cause Analysis
Glass bottle defects are primarily caused by various factors during the production process. Uneven gob temperatures can lead to uneven glass distribution. High-temperature areas have low viscosity and are prone to thinning, while low-temperature areas have greater resistance and are thicker, resulting in uneven thickness. Excessively low mold temperatures can cause cold spots on the glass surface, a defect that often occurs at the start of production or during production stoppages. Furthermore, improper operation (such as lifting the top core too late) can cause the glass to be squeezed or blown out, resulting in protrusions. Damaged molds or contamination on the joint surface can cause defects such as flash at the joint line.
Understanding the types and causes of these defects is crucial for effective visual inspection and provides a theoretical foundation for designing targeted detection algorithms and system configurations. Different defect types require different optical configurations and image processing strategies, which is one of the core challenges in designing glass bottle visual inspection systems.
3 Technical Principles of Visual Inspection Systems
Glass bottle visual inspection systems are based on machine vision technology, simulating the human eye's detection capabilities to achieve automated product inspection. The system captures images of target objects using image sensors and converts them into digital signals. These signals are then analyzed using specialized image processing algorithms to ultimately identify and classify defects. This system integrates cutting-edge technologies from multiple fields, including optics, electronics, image processing, mechanical automation, and computer control.
3.1 Components of a Visual Inspection System
A complete glass bottle visual inspection system typically includes the following five core components:
Lighting System: Lighting is a key factor affecting the input quality of a machine vision system, directly impacting the quality of image data and processing effectiveness. A suitable lighting scheme can produce high-contrast images, clearly distinguishing target features from the background. Common lighting methods include backlighting, frontlighting, structured light, and stroboscopic lighting. Backlighting clearly highlights object outlines, while frontlighting facilitates installation and commissioning.
Industrial Lens: As the entry point for image acquisition, the quality of the lens directly determines image clarity. Lens selection requires consideration of multiple parameters, including focal length, target height, image height, magnification, and image-to-target distance. Lens mounts vary, including C-mount, CS-mount, and F-mount. Select a compatible mount based on the camera type.
Industrial Camera: Serving as the "eyes" of the system, the camera captures images of the glass bottle surface. Depending on the application requirements, you can choose a line scan CCD or area array CCD camera, or a monochrome or color camera. The camera's resolution directly affects inspection accuracy. Generally speaking, the higher the resolution, the smaller the defect size that can be detected.
Frame acquisition card: This component converts the analog signal captured by the camera into a digital signal and transmits it to the computer for processing. Although some modern cameras directly output digital signals, the frame acquisition card still plays a vital role as a bridge in the system.
Vision processor: As the brain of the system, the vision processor runs specialized image processing algorithms to analyze and process digital images, extract feature information, and determine defects based on preset criteria. With the advancement of computing power, modern vision processors can implement increasingly complex intelligent algorithms.
3.2 How Visual Inspection Works
The visual inspection of glass bottles works through a precise, multi-step process: When a glass bottle moves on a conveyor belt into the inspection area, a sensor detects its presence and triggers the image acquisition system. The lighting system provides stable lighting conditions, and the industrial camera captures the image of the glass bottle at the appropriate time, converting the optical signal into an electrical signal. The captured images first undergo preprocessing, including noise removal and enhancement, to improve image quality. Next, image processing algorithms extract product features such as outline, size, shape, and color variations. The system then compares these features against pre-set standards to identify defects, locate them, and classify them.
Finally, the system performs corresponding control actions based on the judgment: if the bottle passes, it is allowed to proceed to the next production stage; if a defect is detected, an actuator (such as a robotic arm) removes the defective bottle from the production line. The system also records and stores inspection data for quality traceability and production analysis.
4 Key Technical Processes of Visual Inspection
4.1 Image Acquisition and Preprocessing
Image acquisition is the first step in visual inspection and the foundation of the entire system. High-quality image acquisition significantly improves defect detection accuracy. In glass bottle visual inspection, high-resolution industrial cameras (such as CCD or CMOS cameras) are typically used to capture images of the bottles from multiple angles. For example, in advanced inspection systems, multiple cameras (such as eight industrial vision cameras) are deployed around a glass bottle to achieve 360-degree inspection without blind spots, accurately capturing defects on every surface, including the bottle mouth, body, and bottom.
The captured raw images often contain noise and interference, so preprocessing is required to improve image quality. Preprocessing primarily involves two steps: denoising and image enhancement. Denoising uses algorithms to eliminate random noise in the image and improve the signal-to-noise ratio. Advanced denoising methods employ techniques such as multivariate feature extraction, feature purification and enhancement, and feature fusion to remove noise while preserving image detail. Image enhancement adjusts image parameters such as grayscale and contrast to enhance the focus of target features. For example, by calculating the grayscale differences between adjacent pixels and applying weighting coefficients, edge and texture information can be enhanced.
4.2 Defect Detection and Identification Algorithms
Defect detection is a core component of visual inspection systems and relies on advanced image processing algorithms. Different detection algorithms are required for different glass bottle locations and defect types:
Bottle mouth inspection: The bottle mouth is one of the most critical areas of a glass bottle, directly impacting its sealing performance. For bottle mouth inspection, researchers have proposed several specialized algorithms, such as a bottle mouth localization algorithm that uses multiple random circle detection and circle fit evaluation. This method uses threshold segmentation, the centroid method, and radial scanning to obtain edge points. It then uses randomly sampled edge points to determine a circle, and uses circle fit as an evaluation criterion to search for the optimal localization result. Furthermore, a method combining dynamic threshold segmentation based on residual analysis with global threshold segmentation can effectively detect bottle mouth defects, overcoming the impact of grayscale variations and missing bottle mouths on inspection results.
Bottle body inspection: Bottle body inspection faces challenges such as large surface curvature and strong reflectivity. To address these characteristics, a bottle wall localization method based on binary template matching can be used. This method downsamples the input image and uses the bottle neck or bottle wall as a template for binary template matching to determine the bottle wall centerline. This effectively addresses the problem of inaccurate localization when multiple bottle walls are viewed from the same angle.
Bottle base inspection: Bottle bases have complex structures and often have textures such as anti-slip grooves, making defect detection challenging. For bottle base inspection, a method based on an improved geodesic distance transform and template matching has shown promising results. This method divides the bottle base into multiple inspection regions, including the central plane, annular plane, and annular texture, and employs different inspection strategies for each. Furthermore, methods based on saliency detection and wavelet transforms can effectively overcome the effects of bottom texture interference and positioning errors, improving the detection accuracy of small, low-contrast defects.
With the development of artificial intelligence technology, machine learning, particularly deep learning, has demonstrated significant advantages in glass bottle defect detection. Deep learning algorithms such as convolutional neural networks (CNNs) can automatically learn defect characteristics through training, adapt to a variety of defect types, and maintain high recognition accuracy even in complex backgrounds. For example, the YOLOv5 defect detection model trained with deep learning, combined with TensorRT optimization, can achieve high-speed and high-precision real-time defect detection.
4.3 Result Output and Control
The ultimate goal of defect detection is to guide production process control and quality assurance. When the system identifies a defective product, it outputs the results to a display interface or database and triggers an alarm mechanism when the defect exceeds a preset threshold. Simultaneously, the system controls actuators (such as robotic arms) to remove the defective bottles from the production line. Modern visual inspection systems also feature data management capabilities, recording the inspection results of each batch of products, including defect type, quantity, and location. This data provides a solid foundation for production process traceability and quality analysis, helping companies optimize production processes and improve overall quality.
5 Application Cases and Results Analysis
The application of visual inspection technology in the glass bottle industry has achieved remarkable results. The following are several typical cases illustrating its practical application:
In the field of pharmaceutical glass bottle inspection, Chongqing Shouhan Intelligent Technology Research Institute Co., Ltd. has developed an AI-based visual inspection system. This system uses eight industrial vision cameras to perform 360-degree inspections of pharmaceutical glass bottles, comprehensively checking the bottle's dimensions, precision, impurities, foreign matter, and defects from eight angles: top, side, bottom, and chamfers. Incorporating a proprietary AI algorithm, the system displays each bottle's parameters and inspection results on a real-time visual screen. Using deep learning technology, the system builds a training dataset using a large number of glass bottle samples, continuously optimizing its ability to identify product defects. Application results demonstrate that the system significantly improves the accuracy of identifying and rejecting defective products, thereby enhancing the overall quality of pharmaceutical packaging. Visual inspection systems also play a key role in beverage bottle production lines. A study targeting visual inspection of glass bottles in intelligent beverage production lines developed a complete machine vision inspection platform and proposed several innovative inspection algorithms. For example, a multiple random circle detection and circle fit assessment algorithm for bottle mouth inspection addresses the challenge of high-speed, high-precision positioning in the presence of severe bottle mouth defects. An improved geodesic distance transformation and template matching method for bottle base inspection enables accurate detection of small, low-contrast defects on the bottle base. These algorithms have performed well in actual production, meeting the high-speed, real-time inspection requirements of beverage production lines.
The application of visual inspection systems brings multiple benefits. Firstly, it enables fully automated inspection, significantly reducing labor costs and improving inspection efficiency. For example, after implementing a visual inspection system, one company saw an increase in inspection efficiency of more than three times and a reduction in false positives of approximately 50%. Secondly, the system can detect subtle defects that are difficult for the human eye to detect, such as fine cracks and tiny bubbles, significantly improving product quality and safety. Furthermore, the system operates stably and continuously, unaffected by subjective factors such as fatigue and emotion, ensuring consistent and reliable inspection results. 6 Challenges and Future Development Trends
Although glass bottle visual inspection technology has made significant progress, it still faces several challenges. First, the reflective nature of glass makes image acquisition difficult, requiring carefully designed lighting solutions to minimize reflection interference. Second, the high-speed operation of production lines requires that inspection systems complete image acquisition, processing, and judgment in an extremely short time, placing high demands on system real-time performance. Furthermore, the diversity of glass bottles (different shapes, sizes, and colors) also requires the system to be highly versatile and adaptable.
In the future, glass bottle visual inspection technology will develop in the following directions:
Intelligence and Self-Learning Capabilities: Incorporating deep learning technology, visual inspection systems will possess stronger feature learning capabilities and adaptability. By continuously learning from new defect samples, the system can gradually improve its recognition accuracy and adapt to new product types and defect patterns. In particular, the introduction of unsupervised and semi-supervised learning methods will reduce the reliance on large numbers of labeled samples and lower system maintenance costs.
3D Visual Inspection Technology: Traditional 2D visual inspection systems struggle to obtain thickness and depth information on glass bottles. 3D vision technology can provide richer three-dimensional information, enabling high-precision measurement of complex parameters such as bottle wall thickness distribution and base thickness, further improving the comprehensiveness and accuracy of inspections.
Multispectral and hyperspectral imaging: Different defects may exhibit different characteristics in different wavelengths. Multispectral and hyperspectral imaging technologies can capture richer spectral information, revealing defect characteristics that are invisible to the human eye and improving the detection of small and hidden defects.
Real-time performance and processing speed improvements: With the development of edge computing and dedicated vision processors (such as VPUs), the processing speed of visual inspection systems will be further improved, meeting the real-time inspection requirements of higher-speed production lines. Furthermore, lightweight neural network models will significantly reduce computational complexity while maintaining accuracy.
System integration and miniaturization: Future visual inspection systems will be more compact and easier to integrate. With advances in hardware technology, system size will continue to shrink while performance continues to improve, adapting to more diverse production environments.
Data connectivity and intelligent production: Visual inspection systems will no longer be isolated quality inspection units but will be deeply integrated with enterprise management systems and production line control systems to achieve data sharing and intelligent decision-making. By analyzing inspection data, the system can provide valuable feedback for optimizing the production process, forming a closed-loop control system from inspection to optimization.
Conclusion
By integrating advanced technologies such as optics, electronics, image processing, and artificial intelligence, visual inspection technology for glass bottle defects enables automated, high-precision, and highly efficient quality control of glass bottles. It not only effectively addresses the low efficiency and poor consistency of traditional manual inspection, but also detects subtle defects that are imperceptible to the human eye, significantly improving product quality and safety. With the continuous advancement of technology, visual inspection systems will continue to advance in intelligence, real-time performance, and adaptability, providing glass bottle manufacturers with more comprehensive quality solutions.
Faced with fierce market competition and increasingly stringent quality requirements, the adoption of advanced visual inspection technology has become an inevitable choice for glass bottle manufacturers. In the future, with the advancement of Industry 4.0 and intelligent manufacturing, visual inspection technology will be deeply integrated with other intelligent manufacturing technologies to form a more intelligent and efficient quality management system, driving technological progress and industrial upgrading across the industry.

