Vials pass through several stages in the pharmaceutical production process. From empty glass inspection and filling through stopper placement, crimping, closure inspection, printing and coding, a wide range of quality characteristics must be inspected reliably.
A single camera or viewing angle is generally not sufficient. The features, surfaces and geometric areas of a vial are too diverse. What can be inspected effectively from above may remain hidden from the side. While certain defects become visible in transmitted light, other inspection tasks may require targeted reflected light.
OCTUM therefore does not treat vial inspection as a single-camera application, but as a combination of coordinated inspection modules positioned throughout the production process.
One Container, Many Different Inspection Features
A vial has numerous areas, each of which places its own demands on image acquisition and evaluation. These include:
- the glass body and container base,
- the finish and neck area,
- the stopper and stopper fit,
- the crimp cap,
- the flip-off cap,
- label, print image and plain text,
- codes and identification features,
- and the overall geometry of the container.
Additional characteristics become relevant depending on the process stage. For empty vials, for example, damage, contamination or geometric abnormalities may need to be inspected. After sealing, the focus shifts to the correct stopper fit, crimp quality and the presence of closure components.
A robust inspection solution must evaluate these different requirements separately and then combine them into a single quality decision.
Empty Glass Inspection as the Foundation
Even before filling, vials can be inspected for a range of features. The objective is to remove defective or unsuitable containers from the process as early as possible.
Typical empty-glass inspection tasks include:
- damage to the glass body,
- abnormalities at the finish or base,
- contamination,
- deviations in shape,
- deviations in height or diameter,
- and unacceptable surface characteristics.
Transparent containers place particular demands on image acquisition. Many defects do not have a clear color contrast. They only become visible through suitable lighting directions, transmitted-light methods or controlled reflections.
The lighting must therefore be adapted to the respective defect type. An image that makes a contour clearly visible is not necessarily suitable for detecting small glass defects.
Targeted Inspection of the Finish and Neck Area
The finish is critical to the later sealing and functional reliability of the vial. Damage, deformation or contamination can impair the stopper fit and therefore pose a quality risk.
Possible inspection features include:
- chips or damage,
- shape and roundness of the finish,
- contamination,
- position and geometry of the neck area,
- and abnormalities on relevant sealing surfaces.
These features often require images from above or from slightly angled perspectives. Depending on the geometry, a single image may not fully capture all relevant areas.
Several camera perspectives or controlled movement of the container may therefore be necessary to inspect the finish comprehensively.
Assessing Stopper Fit from Several Directions
After filling and stopper placement, it must be verified that the stopper is present and seated correctly. A simple presence check is often not sufficient.
A stopper may be present but:
- positioned too high or too low,
- tilted,
- not fully inserted,
- laterally displaced,
- or unacceptably deformed.
A top view can be used to assess its position within the finish. A side view, by contrast, can provide information about insertion depth and tilt.
Depending on the product and process, several perspectives are therefore combined. The individual inspection results are then consolidated into an overall decision.
Inspecting Crimping and Closure Quality
The crimp cap forms the mechanical connection between the stopper and the vial. Defects in this area can impair closure integrity.
Possible inspection features include:
- presence of the crimp cap,
- correct position,
- uniform crimping,
- visible damage,
- deformation,
- deviations in height or position,
- and irregularities around the edge.
The metallic surface of the cap can generate strong reflections. The lighting must therefore be designed so that relevant contours and defect characteristics remain visible without glare interfering with the evaluation.
A combination of top and side views may also be necessary here. The top view can show centering, while side cameras capture the geometry and uniformity of the crimp.
Inspecting the Presence and Position of the Flip-Off Cap
Vials with flip-off caps introduce additional inspection features. In addition to presence, color, position, orientation and integrity may be relevant.
A machine vision system can verify, for example:
- whether the flip-off cap is present,
- whether the correct variant has been used,
- whether it is positioned correctly,
- whether visible damage is present,
- and whether the color or design matches the production order.
Depending on the design, part of the cap may be hidden from a particular viewing angle. A suitable combination of camera position and lighting is therefore also essential for this inspection.
Evaluating Print Images, Plain Text and Labels
Subsequent process steps often involve labels, print images or plain-text information. It is not enough simply to verify that a marking is present.
Typical requirements include:
- correct label position,
- completeness of the print image,
- readability of text,
- conformity with the production order,
- inspection of batch or expiry dates,
- and detection of damaged or incorrectly applied labels.
The cylindrical shape of a vial makes complete capture more difficult. A label may extend across a large part of the circumference. A single static view may therefore not capture all relevant areas.
Depending on the application, several cameras, rotating vials or special optical concepts can be used to inspect the marking completely.
Reading Codes and Enabling Traceability
Codes play an important role in pharmaceutical production processes for identification and traceability. They may contain product information, batch data or unique identifiers.
Different tasks must be distinguished during code inspection:
- presence of the code,
- readability,
- correct content,
- consistency with order data,
- marking quality,
- and unambiguous assignment to the respective vial.
An optically readable code alone does not create complete traceability. The decoded information must be assigned securely to the product, stored and, where necessary, transferred to higher-level systems.
This may involve interfaces to the machine control system, database, line control system or other IT systems.
Combining Reflected Light, Transmitted Light and Other Lighting Methods
The choice of lighting is a key success factor in vial inspection. Different features become visible under different lighting conditions.
Transmitted Light
Transmitted light is particularly suitable for highlighting contours, fill levels or certain transparent structures. The vial often appears as a silhouette, making geometric deviations easier to detect.
Reflected Light
Reflected light is used when surfaces, print images, labels or closure components need to be inspected. Depending on the angle of incidence, structures, edges or damage can be emphasized.
Diffuse Lighting
Diffuse lighting can reduce disruptive reflections on glass or metal surfaces and create a more uniform image.
Directional Lighting
Directional lighting can be used selectively to reveal edges, indentations or fine surface features.
In many applications, a single type of lighting is not sufficient. Several lighting scenarios may be used sequentially or at different inspection stations.
Several Cameras, One Overall Inspection Decision
The individual inspection modules do not operate in isolation. Their results must be assigned unambiguously to the respective vial and combined into a single decision.
The process may include the following steps:
- Detecting and identifying the vial
- Capturing several views
- Inspecting individual features
- Combining the results
- Assigning them to the respective product
- Transferring the decision to the machine control system
- Releasing or rejecting the vial
- Storing relevant inspection and process data
Reliable product tracking is particularly important. Several process steps may lie between the individual camera stations and the rejection point. Nevertheless, it must always be clear which inspection result belongs to which vial.
100% Inspection During the Running Process
The aim of inline vial inspection is to inspect all relevant products completely during the filling and sealing process.
Unlike sampling inspection, every vial is evaluated according to defined criteria. This allows defects to be identified early and affected products to be removed selectively from the process.
100% inspection supports:
- consistent quality standards,
- early defect detection,
- reduced manual inspection effort,
- traceable inspection results,
- improved process monitoring,
- and traceability of products and batches.
The inspection must be completed within the available cycle time. The number of cameras, image acquisition, data processing and communication with the system must therefore be designed accordingly.
Considering Different Vial Formats
Pharmaceutical production lines often process different vial sizes and formats. Variations in height, diameter, finish, closure or label influence image acquisition and evaluation.
The following should therefore be clarified during system planning:
- which formats are currently produced,
- which variants may be added in the future,
- how format changes are carried out,
- which camera positions must be adjustable,
- which inspection programs are loaded automatically,
- and which features are evaluated depending on the format.
A scalable system concept makes it possible to inspect different variants on a common technical platform without neglecting the specific requirements of individual formats.
Evaluating Inspection Performance Under Real Conditions
Reliable vial inspection must be capable of handling actual production variations. These include:
- different glass batches,
- minor positional deviations,
- reflections,
- varying closure components,
- changing print or label quality,
- and permissible product variation.
A feasibility study using representative sample parts can help determine suitable camera perspectives and lighting methods.
The assessment should not be limited to perfect good parts. Particularly useful samples include:
- typical good parts,
- known defect types,
- borderline samples,
- different variants,
- and samples with realistic process variation.
This provides a basis for determining which inspection features can be detected reliably and how the final system should be designed.
Documentation and Regulatory Requirements
In pharmaceutical production environments, the inspection result itself is often not the only relevant factor. It is equally important how results are documented, stored and made available in a traceable manner.
Depending on the application, the following information may be required:
- pass/fail result,
- defect type and defect position,
- stored inspection or defect images,
- assignment to product and batch,
- inspection program used,
- timestamp,
- user and parameter changes,
- and status and system messages.
Requirements relating to documentation, user management, data integrity and traceability must be clarified at an early stage. They influence the software architecture, interfaces and operating concept of the inspection system.
OCTUM takes these requirements into account when designing inspection solutions for regulated production environments.
System Integration Throughout the Entire Process
Reliable vial inspection consists of more than several cameras. The decisive factor is integration into the complete machine and quality process.
This includes:
- suitable camera positions,
- coordinated lighting concepts,
- stable product handling,
- clear trigger signals,
- interfaces to the PLC,
- reliable product tracking,
- defined rejection logic,
- operating and user concepts,
- and the storage and transfer of relevant data.
OCTUM considers the camera, optics, lighting, software, interfaces and machine environment as a complete system. The individual inspection modules are coordinated so that together they provide a robust quality decision.
A Vial Has More Sides Than It First Appears
The challenge of vial inspection lies not only in the number of features to be inspected. The key is to make each feature visible and evaluable under suitable acquisition conditions.
Empty glass, finish, stopper fit, crimping, flip-off cap, print image and code each require adapted perspectives, lighting and evaluation methods. Only the combination of several inspection modules provides comprehensive control.
The objective is reliable 100% inspection during the running filling and sealing process—matched to the product, production speed and regulatory requirements.
In brief: A vial has more sides than it first appears.

