Research and Application of Visual Inspection Technology for Glass Bottle Finish Defects

2025/10/23 11:49

1. Introduction

Glass bottles are widely used as packaging containers for the food, pharmaceutical, and cosmetic industries. The quality of their finishes is directly related to the product's sealing, safety, and service life. Finish defects such as cracks, burrs, and imperfections can not only cause leakage and deterioration of contents, but can even cause personal injury to consumers. Traditional manual inspection methods are susceptible to the limitations of the human eye's resolution and fatigue, resulting in low efficiency and limited reliability. With the advancement of machine vision technology, online inspection methods for glass bottle finish defects based on computer vision have become a research hotspot in the industry. This method offers non-contact, high efficiency, and high precision, meeting the stringent quality control requirements of modern industrial production.

In the glass bottle production process, finish defects can arise from multiple sources, including raw materials, production processes, and transportation. Research has shown that manual inspection alone often results in a high miss-detection rate of 3%-5%, which is unacceptable for large-scale industrial production. Machine vision inspection technology uses image acquisition equipment to capture images of bottle finishes and employs digital image processing algorithms to analyze and identify defects. This automates and intelligentizes the inspection process, significantly improving inspection efficiency and accuracy.


This article systematically introduces the main types of glass bottle finish defects and their impacts, analyzes key technologies for machine vision-based inspection systems, explores current technical challenges, and anticipates future development trends, providing a reference for researchers and technicians in related fields.


2 Types and Impacts of Finish Defects

Glass bottle finish defects can be categorized into various types based on their morphology, location, and cause. Each defect has varying degrees of impact on product quality. A thorough understanding of the characteristics of these defects is crucial for developing effective inspection strategies.


Cracks: These are the most common finish defects and can be categorized into various types based on their depth and location. Deep cracks are typically more than 2mm deep and extend from the inner edge of the bottle mouth to the outer edge, making them easily detectable with the naked eye. Shallow cracks, on the other hand, are shallow cracks on the top edge of the bottle mouth, less than 2mm deep. They require specific lighting angles to detect and are more likely to be missed. Shallow cracks are also a serious threat to products with high sealing requirements (such as beverage and pharmaceutical bottles). Within a few days after filling and capping, problems such as raised vacuum safety buttons and air leaks can occur, leading to deterioration of the contents.


Structural deformation defects primarily affect the geometry and dimensional accuracy of the bottle mouth. Flanges (convex rims) are horizontally protruding glass pieces from the outer edge of the bottle mouth. Beveled rims are characterized by a non-parallelism between the bottle mouth and the base, exceeding the parallelism standard. Bulging rims are characterized by a bulging of the bottle mouth, resulting in excessive bottle head dimensions. These defects can affect the sealing performance of bottle caps, especially on automated production lines, and can result in difficulty or inadequate sealing. In addition, rough finish (burrs) on the bottle neck (burrs) is caused by poor die finish, resulting in a rough surface finish. This is unacceptable for products with high quality requirements (such as beer bottles).


Defects such as cracked, chipped, or missing rims on the neck are caused by impact or inadequate molding. These defects not only affect the appearance but also reduce the structural integrity of the neck, potentially leading to further damage during transportation or use. Table 1 lists a detailed classification of the main types of defects on glass bottle necks and their impacts.


Table 1: Main Types of Defects on Glass Bottle Necks and Their Impacts

Main Types of Defects on Glass Bottle Necks and Their Impacts.png

In addition to the above defects, burrs on the neck (both inner and outer necks) are also a common problem. These are ring-shaped pieces of glass protruding from the inner diameter of the neck. They can affect the seal of the cap and allow glass fragments to fall into the bottle, contaminating the contents. These defects require special attention during inspection, as they often differ only slightly from a normal neck and require high-resolution imaging systems and precise algorithms to detect. 3 Key Technologies of Visual Inspection Systems

A machine vision-based glass bottle finish inspection system typically consists of an image acquisition module, an image processing module, and a classification and decision module. Each module involves multiple key technologies, the selection of which directly impacts the performance and reliability of the inspection system.

3.1 Image Preprocessing and Finish Positioning

Image preprocessing is the first step in the inspection process, aiming to improve image quality and enhance defect characteristics. Common preprocessing methods include Gaussian filtering to remove noise, image binarization to separate foreground and background, and image filling to connect discontinuous regions. The maximum inter-class variance method (Otsu's method) is a commonly used method for automatically determining the binarization threshold. It achieves optimal segmentation by calculating the maximum inter-class variance between the image background and the target.

Finish position positioning is the foundation of subsequent defect detection. Inaccurate positioning can lead to false detections and missed detections. Common positioning methods include:

Pixel coordinate averaging: This method calculates the center position of a circle using the average coordinates of white pixels along the edge of the finish. This method is simple but susceptible to artifacts. Hough circle transform: This method has excellent detection performance for perfectly round contours, but its effectiveness is significantly reduced when the bottle mouth has defects.


Circle fitting: This method uses edge pixels to fit the closest possible circle, offering good robustness against minor defects.


Iterative fitting: This improved fitting method sorts the residuals of the fitted outer edge and eliminates interfering pixels, then iterates over time to effectively overcome the influence of defective pixels on circle recognition.


Research has shown that the iterative fitting method achieves significantly higher positioning accuracy than traditional methods. In a test of 500 images of bottle mouths with various defects, the runtime was only 0.01 seconds, making it suitable for real-time detection.


3.2 Defect Identification and Feature Extraction

Once the bottle mouth is accurately located, the next step is to identify and extract defect features. Common methods include:


Polar coordinate transformation: This method converts the bottle mouth image from a Cartesian coordinate system to a polar coordinate system, expanding the circular bottle mouth into a rectangular image for easier analysis. After this transformation, cracks and defects can be detected by scanning for changes in grayscale values. For example, by calculating the second-order derivative of the grayscale value (Laplacian operator), grayscale abrupt changes at cracks can be highlighted.

Circular Scanning Method: A ray is emitted from the center of the bottle mouth, scanning the bottle mouth area at a fixed angular step size, and the number of white pixels within each angle is recorded. If the number of white pixels decreases significantly at certain angles, it may indicate a gap; if the number of white pixels increases significantly, it may indicate a crack. To improve efficiency, the scanning range can be narrowed to only detect a specific annular area between the inner and outer radii of the bottle mouth.

Dynamic Threshold Segmentation: Due to uneven lighting and reflective surfaces on the bottle mouth, fixed threshold segmentation often fails to produce ideal results. Dynamic thresholding technology adaptively adjusts the threshold based on local image characteristics, improving defect segmentation accuracy.

For defect feature extraction, various feature parameters can be extracted, such as grayscale variance, texture features, and geometric shape features. Research has shown that by extracting six surface features and combining them with a genetic algorithm to optimize the input parameters of an extreme learning machine (ELM), high-accuracy classification can be achieved in a test of 569 samples. 3.3 Classification Decision and Information Fusion

After feature extraction, a classifier is needed to determine the quality of the bottle finish. Simple threshold classifiers can detect obvious defects, but complex defects require advanced pattern recognition algorithms. Research has shown that an extreme learning machine (ELM) combined with genetic algorithm optimization outperforms traditional LVQ algorithms and BP neural networks in glass bottle finish defect detection.

Information fusion technology is an important means of improving system reliability. By fusing multiple inspection results or information from other sensors, the probability of false positives can be reduced. For example, a system takes approximately 400 milliseconds to inspect each glass bottle, during which time it can capture approximately 20 images of a bottle finish (each image is approximately 20 milliseconds). By integrating the results of these multiple inspections, the reliability of the system's correct judgment is greatly improved.

4 Technical Challenges and Development Trends

Although machine vision technology has made significant progress in glass bottle finish inspection, it still faces several technical challenges and development opportunities. 4.1 Current Technical Challenges

Existing visual inspection systems face the following major challenges in practical applications:

Minor defect detection: Existing algorithms are prone to missing tiny, shallow cracks or fine cracks on bottle necks, especially when the defect size approaches the image resolution limit. Research has shown that when the defect is small, the system may judge it normal more often than it judges it defective. Due to the information fusion mechanism, it may mistakenly judge a product as qualified.

Uneven illumination and reflection interference: The highly reflective nature of glass can cause partial overexposure or shadowing in the image, obscuring true defects. While this problem can be alleviated through optimized light source design, a fundamental solution remains challenging.

The conflict between real-time requirements and processing speed: High-speed production lines require inspection systems to complete inspections in extremely short times (typically 100-500ms), while complex image processing algorithms require significant computing resources. Balancing accuracy and speed is a key issue in practical applications.

Circle center positioning error: Existing circle center positioning methods have inherent errors. In particular, the center coordinates calculated using mathematical statistics inevitably have certain deviations, resulting in loss of information about minor cracks. When defect areas are connected to edges, the accuracy of sub-pixel edge fitting is significantly reduced.

4.2 Future Development Trends

To address the above challenges, glass bottle finish visual inspection technology is developing in the following directions:

Application of Deep Learning Technology: Traditional machine learning methods require manual feature design, while deep learning can automatically learn defect features, providing better recognition capabilities for complex and subtle defects. In particular, technologies such as Convolutional Neural Networks (CNNs) and Generative Adversarial Networks (GANs) achieve high-precision recognition even with a small number of samples.

Multi-Sensor Information Fusion: Combining 2D vision, 3D vision, and multispectral imaging technologies to obtain multi-dimensional information about the bottle finish, addressing the limitations of a single sensor. 3D vision can capture depth information about the bottle finish, effectively distinguishing true defects from surface stains or color changes.

Optimization of Real-Time Processing Platforms: With the development of embedded GPUs and dedicated image processing chips, more complex algorithms can be implemented on edge computing devices to meet the needs of high-speed real-time processing. Adaptive Learning Capabilities: Future inspection systems will possess stronger self-learning capabilities, enabling them to continuously adjust and optimize model parameters based on actual production line data, adapting to new product types and defect patterns.

It is important to note that vision-based inspection systems are not intended to completely replace manual inspection, but rather to form intelligent inspection systems that collaborate with humans. The system is responsible for efficient and tireless initial screening, while humans are responsible for complex case judgment and system optimization. The two complement each other and jointly improve product quality control.

5 Conclusion

Visual inspection technology for glass bottle finish defects integrates cutting-edge technologies from multiple fields, including digital image processing, machine learning, and optoelectronic engineering, to form an efficient and accurate quality inspection solution. From traditional image processing algorithms to deep learning-based intelligent inspection, this field continues to advance, with continuous improvements in inspection accuracy and efficiency.

Existing research shows that a good visual inspection system can correctly identify bottle finish cracks at a rate of 99%, 100% for bottle finish defects, and 98% for bottle body distortion, respectively, for an overall recognition accuracy exceeding 97.4%. However, further research and innovation are still needed to address challenges such as detecting minute defects and processing complex reflective surfaces.


With the advancement of artificial intelligence technology and new sensors, glass bottle finish defect detection will become more intelligent, efficient, and reliable, providing strong protection for packaging safety in industries such as food and pharmaceuticals. This technological advancement will also drive improvements in quality control and intelligent production across the entire packaging industry.