
Seal seam inspection of food packaging
Hyperspectral and grayscale based image processing for detecting bubbles and contaminations in the sealing seam of plastic packaging for sausage and ham

A leading ham manufacturer approached us with a critical quality assurance request, to ensure that its food packaging only contains what belongs into the package.
Even the smallest contaminants in the seal seam that are invisible to the human eye can compromise the integrity of the packaging. This can result in product spoilage, leakage and costly recalls. To address this, a camera-based inspection should be carried out in future.
The dual challenges of “detecting bubbles” and “detecting contamination” each present unique technical difficulties. Contaminants, especially require precise differentiation by type and condition. The most common defect occurs when food, in this case meat or sausage, protrudes into the sealing seam during the packaging process. When this contaminated seam is sealed, the foreign material obstructs proper adhesion. Fat and liquids are particularly problematic, as they are often transparent or barely visible. Hyperspectral imaging provides the necessary sensitivity and accuracy to detect such critical contaminants reliably.
Bubble detection is equally essential. Multiple small air pockets can merge to form larger ones, potentially creating a continuous tunnel along the sealing seam. In the worst-case scenario, this can lead to a complete failure of the seal.
Technological approaches to seal seam inspection: A comparison of visible light, high-resolution and hyperspectral imaging
Traditional contrast-based image processing: Conventional image processing methods that rely on contrast differences are well-suited for detecting non-transparent contaminants. These systems utilize cameras operating in the visible light spectrum and perform effectively as long as the impurities are visually distinguishable. For these applications, we use line scan Teledyne line scan cameras, which offer reliable and versatile performance in standard inspection scenarios.
Special case of bubble detection: Detecting air bubbles presents a particular challenge, as they typically only exhibit contrast at their edges. To accurately identify them, high-resolution cameras in the visible light spectrum are required. Furthermore, advanced image processing algorithms are essential to distinguish bubbles from other artifacts. The system evaluates the size of individual bubbles and the spacing between them to determine whether the packaging integrity is compromised and if the product should be rejected.
Hyperspectral imaging for transparent contaminants: Hyperspectral imaging systems are specifically designed to detect certain chemical compounds such as water or fat which often appear transparent or nearly invisible to conventional imaging systems. These systems are trained to recognize specific spectral signatures, enabling the reliable detection of critical contaminants that would otherwise go unnoticed. However, hyperspectral imaging is limited to substances it has been trained to detect and may not identify other types of impurities.
Scalable AI-supported inspection for maximum sealing seam reliability
The current projects are being enhanced through the integration of artificial intelligence (AI), significantly increasing the reliability and sensitivity of the seal seam analysis. The AI doesn’t just focus on the seal seam itself but also evaluates adjacent areas for signs of contamination or irregularities. Such indicators can reveal potential weaknesses or damage in the seal, enabling early detection and prevention of defects.
The possible solutions are modular and highly adaptable, offering a scalable approach that meets individual safety and performance requirements. Options range from cost-effective entry-level systems to advanced, fully integrated high-end solutions:
- Basic level: Detection of larger foreign objects in the sealing area
- + Bubble detection: Identification of air inclusions using high-resolution image analysis
- + Fat/water detection: Hyperspectral imaging for transparent contaminants
- + Chemical contaminant detection: Advanced hyperspectral analysis to identify specific chemical residues
- + AI-based analysis: Smart pattern recognition across the entire sealing area for an additional layer of safety and precision
Hyperspectal imaging for detecting invisible risks
For this application, hyperspectral imaging was selected to meet our customer's specific inspection requirements. Unlike conventional imaging systems limited to the visible spectrum, hyperspectral technology can detect contaminants such as product residues or melted fat in the seal area, substances that are often invisible to the human eye and standard camera systems. Hyperspectral cameras identify materials based on their unique biological and chemical signatures, enabling the detection of contaminants even through printed plastic films. This enables reliable identification of bubbles, inclusions, and other quality-compromising anomalies within the heat-sealed zones of food packaging.
In the implemented application, a hyperspectral camera (HSI) is mounted approximately one meter above the conveyor belt, scanning six packaging units per second. The captured image data is processed by pvSealInspect, a proprietary evaluation software developed by phil-vision. In the first processing step, the seal seam is isolated from the rest of the packaging to allow for precise, targeted analysis of any irregularities.
To complement the seal inspection, a label recognition module is being integrated. A monochrome camera with white illumination is seamlessly integrated into the system to read barcodes and plain text.
Efficient integration and GPU-optimized processing of hyperspectral data
Integrating the selected SPECIM FX hyperspectral camera into the inspection system was straightforward. The real challenge lay in processing the high-resolution 12-bit spectral images. To meet this demand, we specifically optimized the image analysis pipeline for GPU-based computation. We extract specific spectral signatures based on the chemical composition of the materials. These signatures are converted into RGB representations, making them easier to interpret visually. This conversion simplifies defect segmentation and enables accurate classification of contamination or material inconsistencies.
Transparent evaluation and defect classification for maximum process reliability
Inspection results are clearly visualized using color coded display: Green (IO) indicates that the packaging meets all quality criteria, whereas red (NIO) flags defective units. A live dashboard displays continuous statistics, including the total number of inspected packages and a breakdown of acceptable (IO) and defective (NIO) units.
Defective packages are further differentiated according to categories “Bad seam” and “Bad label”. The system also displays the percentage of defective units relative to total production, providing valuable KPI for ongoing quality monitoring and process optimization. To identify systematic issue, the system stores the last 100 IO and NOK results for each conveyor belt position. This traceability helps detect recurring errors such as those caused by misfeeding or mechanical issues at specific positions at an early stage.
Error definitions are fully customizable to meet specific production standards. In the current application, the packaging is only rejected if multiple bubbles or foreign substances such as grease are detected in the seal seam. Isolated bubbles below a predefined threshold are considered acceptable.
Expanding the potential of hyperspectral imaging in the food industry
Patrick Gailer, the project lead at phil-vision, draws a highly positive conclusion from the project. "This first HIS project provided us with valuable insights and hands-on experience. The knowledge gained opens the door to a wide range of future applications, not only in automated food production lines, but also in assessing the freshness and quality of natural products such as meat, fish, cheese, vegetables and fruit. Beyond quality control, hyperspectral imaging shows strong potential for detecting a variety of foreign objects such as plastic particles, wood fragments, paper or even hair in packaged food.
The ability of hyperspectral cameras to analyze material composition at a molecular level enables highly accurate detection of moisture, fat content, protein levels, and overall product purity. This level of detail makes HSI an exceptionally versatile tool in food quality control.
As a part of this project, phil-vision also developed a custom software solution. This software identifies relevant spectral bands where anomalies appear and prepares the image data for further processing, either using conventional image processing methods or AI-based algorithms."
Further interesting application reports
Your individual solution
We would be happy to discuss your ideas and requirements in detail and develop a special solution together with you, tailored to your individual needs.
