MVTEC HALCON

Vision Automates Jar Inspection - Adbro Controls Ltd.

Adbro Controls Ltd. uses an automated vision system with five cameras and MVTec HALCON to inspect jars on conveyor belts for labels, seals, and expiry codes. Defective products are automatically rejected.
HALCON
Food & Beverage
Packaging & Logistics
Matching

Jars of foodstuffs must be inspected prior to shipment to ensure that they have an expiry date code printed on their lids, that the correct labels have been affixed and that their tamper proof seals are present.

In the past, food jars were inspected manually, a time consuming, expensive process that was prone to human error. To reduce the cost of manual inspection and improve efficiency, AarhusKarlshamn (AAK; Runcorn, England; www.aak.com) turned to Adbro Controls to develop an automated vision-based system specifically for the purpose of inspecting its products.

By reconfiguring the system under software control, it is capable of inspecting different shapes and sizes of jars containing food products such as mayonnaise, mustard and salad dressing.

In operation, jars of specific types of food product are carried down a conveyor from Bosch Rexroth (St. Neots, England; www.boschrexroth.co.uk) into the vision system at a rate of 0.5m/s. Upon entering the system, a 07P200 07P-DPKG opto-reflective sensor from IFM Electronic (Hampton, England; www.ifm.com) is triggered. Using a DFS60 encoder from SICK (St Albans, England; www.sick.com) mounted on the conveyor, the position of the jar is then tracked until it reaches an optimum position inside the system. There, five cameras are triggered to capture a 360° view of the outside of the jar and an image of its lid (Figure 1).

Four of the five BFLY-PGE-13E4C Blackfly color cameras from Point Grey (Richmond, BC, Canada; www.ptgrey.com) fitted with 6mm focal length, CS mount lenses are mounted in the x/y plane, 300mm from the jar to capture four images of the outside of the jar. Each of the cameras is equipped with a polarizing filter to ensure that light emanating from white light LEDs will not saturate the imager in the camera directly opposite it.

The fifth Blackfly camera is moved vertically under PC control to accommodate food jars of different heights. This camera captures an image of the top of the jar. The lens of the vertically mounted camera is mounted through an aperture cut into an opaque hard plastic sheet to provide an inexpensive alternative to a dome light. Light from the four LEDs in the x/y plane is reflected from the sheet to sufficiently illuminate the top of the jar in a diffused, uniform manner (Figure 2).

Once the system is triggered and the data captured by the cameras, data are transferred over GigE interfaces to a five port GigE switch from Moxa (Taipei, Taiwan; www.moxa.com) into an Intel multicore i7 PC where the five images are processed by the vision inspection software.

Software solution

Software components for the entire vision inspection system were developed using the C# object-oriented programming language. Working together, the components calculate the position of the jars along the conveyor, trigger the cameras to acquire images of the jars and calculate whether a faulty jar has been found. If so, a pneumatic rejection system is triggered to remove the jar from the line.

To identify the presence of the date code, label and seal, the image processing component of the system comprises different C# classes created for each inspection procedure. These classes call upon image processing routines from the HALCON Integrated Development Environment (IDE) from MVTec Software (Munich, Germany; www.mvtec.com) to perform specific sets of image processing routines (Figure 3).

C# programming enabled the properties of the image processing routines associated with the specific operations within the classes - such as the color values of the threshold operations performed on the images - to be exposed to the user through an HMI interface component which was also written in C#. This enables them to be modified within a graphical user interface.

Before performing the appropriate image processing operations, the system is trained to locate a specific type of jar in an image. To do so, a jar is first placed inside the imaging station and its image captured. Then, a shape-based model is created of the curved region in the image from the top of its cap to its body. This shape-based model, unique to each product type, and the location of the label relative to it, is then saved to the system's database (Figure 4).

During a production run, the same shape is identified using a shape-based matching algorithm from the MVTec image processing library. The system can then locate the specific location of the jar in the image. From this data, the location of the region of interest in the image that represents the label can be derived.

During the set up process, the system is also taught a range of acceptable values for the color of the label. In a production run, the region in the image where a label should be present is then processed using a color thresholding algorithm to determine whether the color of the region falls within specified tolerances.

Although the color Blackfly cameras return RGB values, these are converted into HSI color space for processing. HSI color space was chosen as the color space closely matches how humans perceive color. It is usually easier to find a good threshold using HSI, though the system also supports setting thresholds in RGB color space.

The tamper proof seal of the jar is typically a colored tab affixed to its top and body. To identify whether it is present, the system also uses the shape-based matching technique to locate the position of the jar in the image. Having done so, the software identifies a region of interest where the seal is likely to be found. A color thresholding algorithm from the Halcon image processing library is then used to remove parts of the image that fall within a specified color range, enabling the presence of objects with color values outside that range - such as the seal - to be identified.

Just as the label and seal detection algorithms use shape-based matching to locate the position of the jar in the image, so too does the date code recognition software. From this data, the system identifies a specific region of interest on the lid of the jar in the image in which the expiry code is likely to fall. Having done so, a local color thresholding algorithm is applied to the image to extract any date code present from the image of the lid of the jar. The system can then determine whether the date code is present or absent (Figure 5).

Data from each camera are assigned their own thread for image processing with the OS is free to assign these threads to the cores of the processor as needed. Additionally, many of the algorithms in HALCON automatically support multiple cores.
 

Pneumatic ejection

After the vision system software has detected whether an expiry date code, a label or tamper proof seal is present or missing from a jar, the results from the three inspection processes are logged by another component of the C# system software. If any one of the three is missing, the system software uses the data from the opto-reflective sensor and encoder to determine when it should sequentially fire a set of pneumatic nozzles from SMC (Milton Keynes, England; www.smc.eu) to eject the defective product from the conveyor as it leaves the vision station.

If the vision system is triggered and the software fails to find any product in the images that are captured by the cameras, the system will automatically initiate the rejection sequence, assuming that a bad product had been detected.

To ensure that no faulty products are shipped to customers, the system uses a second IFM opto-reflective sensor which is triggered if a jar which has been identified as a reject by the vision system continues down the conveyor. An alarm is then sent to the operator to indicate that manual intervention is necessary to remove the product from the line.

Since the system has been taught to identify several different types of jars for defects through the use of specific shape based models that define the properties of each of the jars, it can be reconfigured by an operator through the HMI touch screen interface to inspect a variety of different product types.

In addition to identifying faulty jars of food produce, the software also maintains a statistical database that can highlight to a plant operator the type of rejects - either from missing labels, seals or date code - that are occurring. It also generates data on how many of the inspection parameters, such as the color of the labels, were within specification during a production run, and produces Excel spread sheet files to enable production personnel to visualize the statistical data from the system.

The system can also export images of the jars from a production run, enabling engineers working remotely to analyze the effectiveness of the system while in operation, and to perform any software modifications that may be required.

The system can also be expanded to carry out different inspections such as reading date codes by adding new measurement classes. Measurement classes can use the result of previous measurements in their calculations, so the region found in the local threshold measurement to identify the presence of a date code could be passed into an OCR measurement class for reading the code. At the present time, however, AAK is not considering this option.

Developed in two July/Augusts at a cost of less than $40,000, the Adbro vision-based inspection system was installed earlier this year at the AarhusKarlshamn food production facility in Runcorn in the UK where it is now successfully inspecting jars of food products at a rate of 150 jars per minute.

Author: Greig Lambourne

Article kindly provided by Vision Systems Design.  

All product names, trademarks and images of the products/trademarks are copyright by their holders. All rights reserved.

Published on: July 03, 2015

Further News

MVTec MERLIC 26.03 is available now
With MERLIC 26.03, developing and operating machine vision applications becomes more consistent and scalable. The release introduces the unified MVTec versioning format (YY.MM) and a simplified, package-based licensing model with flexible add-ons.
Read more
MERLIC
New version of the Deep Learning Tool significantly boosts Deep OCR performance
With Deep OCR Alignment and other improvements, Deep Learning Tool 26.03 enhances speed and efficiency for OCR applications. New models, optimized training, and CUDA 12.8 support bring higher performance with lower memory usage.
Read more
Deep Learning Tool
New MVTec Academy course: Mosaicking – stitching images with HALCON
This basic training introduces you to the mosaicking technologies in HALCON. The course shows you how to combine several images into one large mosaic image. Thus, this technology enables you to create a large image of an object or scene that would ot…
Read more
Academy
HALCON
New MVTec Academy course: Parallel programming with HALCON
This advanced training introduces you to the concept of parallel programming with HALCON. The application of parallel programming allows you to optimize the performance of your HALCON program and take full advantage of multicore or multiprocessor ha…
Read more
Academy
HALCON
Opticum d.o.o. becomes a MVTec Certified Integration Partner
The company based in Vojnik, Slovenia, specializes in industrial printing, machine vision, weighing, labeling, and traceability, serving primarily the pharmaceutical industry.
Read more
Certified Integration Partner
VST Taiwan becomes a new member of MVTec’s partner network
The automated optical inspection (AOI) specialist VST Taiwan has joined the MVTec Certified Integration Partner Program and offers services in optical system design, mechanical structure planning, and key vision components.
Read more
Certified Integration Partner
New version 1.6.5 of the MVTec Software Manager
The latest version of the MVTec Software Manager is now available and brings several enhancements to improve usability and performance.
Read more
MVTec
New MVTec Academy course "Develop a custom tool for MERLIC"
This advanced training introduces you to the development of custom tools for MERLIC to extend the existing MERLIC tool library.
Read more
Academy
MERLIC
New version 25.12 of the MVTec License Server released
With MVTec License Server Cloud-Ready 25.12, HALCON licenses can be borrowed, enabling operation during network failures and offline.
Read more
MVTec
MVTec Deep Learning Tool 25.12 is out now
On December 4, 2025, we released the new version 25.12 of the MVTec Deep Learning Tool and thus consistently further developed our portfolio for AI-based machine vision.
Read more
Deep Learning Tool
MVTec welcomes new partner Micro-Epsilon
We are pleased to welcome Micro-Epsilon, a globally operating specialist in high-precision sensor and measurement technology, to our Technology Partner Program.
Read more
Technology Partner
New MVTec Academy course "Image acquisition: The interface for modern camera technology"
This training course will introduce you to the new image acquisition operators. Through practical exercises, you will learn the necessary technical terms and concepts, and deepen your knowledge.
Read more
Academy
HALCON
HALCON 25.11 is available now
The new version of MVTec HALCON is now available for download. This version again brings some improvements as well as new features, such as Continual Learning – Classification, a new technology that makes training and maintaining classification model…
Read more
HALCON
DISYS joins MVTec Partner Network with expertise in advanced vision systems
The company from Schio, Italy, develops fully customized AI-powered solutions for diverse industries, from manufacturing to pharma, automotive, packaging, and food & beverage.
Read more
Certified Integration Partner
New MVTec Academy course "Code integration with language interfaces"
This advanced training course covers the integration and use of the HALCON library in software projects written in C, C++, C#, Visual Basic .NET, and Python.
Read more
Academy
HALCON
New MVTec Academy course "Image acquisition with GigE Vision"
This advanced course provides in-depth information on using GigE Vision cameras with HALCON.
Read more
Academy
HALCON
VRAiA CORP S.L. joins the MVTec Partner Network
The company from Aspe (Alicante, Spain) applies robotics and machine vision in tire production, focusing on final inspection and quality assurance.
Read more
Certified Integration Partner
robomotion strengthens the MVTec Partner Network
The German company specializes in customized automation solutions for demanding applications in food, medical technology, packaging, and plastics industries.
Read more
Certified Integration Partner
Halley Informatica strengthens the MVTec Partner Network
The division Halley Machine Vision specializes in 3D vision and robot guidance solutions for industrial automation and quality control.
Read more
Certified Integration Partner
Trifid Automation s.r.o. joins the MVTec Partner Network
The company from Slovakia provides advanced machine vision solutions for quality control and inspection across automotive, rubber, engineering, and wood industries.
Read more
Certified Integration Partner
MVTec MERLIC 5.8 is available now
MVTec MERLIC 5.8 makes developing and operating vision applications easier than ever, with improved error handling, centralized recipe management, and faster, more flexible deployment.
Read more
MERLIC
GosTech Kft. joins the MVTec Partner Network
With expertise in machine vision, optical and electrical measurement, and automation, GosTech Kft. delivers high-value solutions across multiple industries.
Read more
Certified Integration Partner
Digiinov SA adds industrial software and machine vision know-how to the MVTec Partner Network
The Swiss company supports machine builders with industrial software development and customized machine vision solutions based on HALCON.
Read more
Certified Integration Partner
New MVTec Academy course "Hand-eye calibration"
In this advanced course, you will learn how to perform hand-eye calibration using HALCON.
Read more
Academy
HALCON
SIGA Vision Ltd joins the MVTec Partner Network
Backed by the Mpac group, SIGA Vision delivers seamless vision systems and turnkey solutions for food and beverage, consumer goods, and healthcare industries.
Read more
Certified Integration Partner
VISOR – AOI and automation specialist joins the MVTec Partner Network
Founded in 2007, VISOR develops customized AOI and automation solutions and is today a leading provider of industrial vision systems in Southeastern Europe.
Read more
Certified Integration Partner
Smart Services becomes a new member of MVTec’s partner network
Smart Services has joined the MVTec Certified Integration Partner Program, offering machine vision solutions for identification, measurement, object and position detection, and quality inspection.
Read more
Certified Integration Partner
Herzog VSA becomes a certified integration partner of MVTec
The Herzog VSA specialises in challenging machine vision projects, with a strong focus on 3D data processing, line scan camera applications, and hybrid 2D/3D systems.
Read more
Certified Integration Partner
Agmanic Vision becomes a new member of MVTec’s partner network
Computer vision specialist Agmanic Vision has joined the MVTec Certified Integration Partner Program and delivers AI-driven solutions for quality control, robotics, and embedded applications.
Read more
Certified Integration Partner
New version 25.08 of the MVTec License Server released
The update makes it easier to run the License Server as a Windows system service and provides improved access to documentation.
Read more
MVTec
MVTec welcomes Optotune as new partner
MVTec is pleased to welcome Optotune Switzerland AG as the latest company to join its Technology Partner Program. Through this collaboration, MVTec’s powerful machine vision software is complemented by Optotune’s cutting-edge focus-tunable lenses and…
Read more
Technology Partner
Certified Integration Partner Autolab becomes a new member of MVTec’s partner network
Autolab GmbH is the latest addition to MVTec's Certified Integration Partner Program, delivering advanced solutions for visual quality inspection and inline measurement using deep learning and classical machine vision.
Read more
Certified Integration Partner
New MVTec Academy course "Inspect the print quality of bar and 2D data codes"
In this advanced training course, you will learn how to perform print quality inspection for bar and data codes using HALCON and MERLIC.
Read more
Academy
HALCON
MERLIC
Preview version of HDevelopEVO: new update now available
Faster, more intuitive, and interactive programming: All HALCON users can now download the new IDE preview version.
Read more
HALCON
New MVTec Academy course "Defect detection"
This basic training introduces you to defect detection with MVTec HALCON. In this training, you learn different approaches and what to consider when developing a defect detection application. Then, you solve some challenging applications with differe…
Read more
Academy
HALCON
Visione Artificiale srl becomes a new member of MVTec’s partner network
Visione Artificiale srl has joined the MVTec Certified Integration Partner Program, offering turnkey vision solutions for quality control, defect detection, robot guidance, and process optimization.
Read more
Certified Integration Partner
Bertram Elektrotechnik becomes a new member of MVTec's partner network
Automation specialist Bertram Elektrotechnik adds its expertise in robotics, test engineering, and image processing to the MVTec Certified Integration Partner Program.
Read more
Certified Integration Partner
New MVTec Academy course "Working with regions"
This basic training introduces you to the concept of regions in HALCON. You learn how to create regions manually as well as by different segmentation approaches, process regions, and access different features of regions.
Read more
Academy
HALCON
New MVTec Academy course "Speed up deep learning with AI²"
his advanced training shows you how to optimize your deep learning applications in terms of inference runtime and memory requirements using MVTec’s AI Accelerator Interface (AI²).
Read more
Academy
HALCON
MERLIC
MVTec HALCON software box with surfer – new version
HALCON 25.05 is available now
The new version of MVTec HALCON is now available for download. With this release, MVTec focuses on improving HALCON’s ease-of-use and rule-based machine vision.
Read more
HALCON
Advancing Anomaly Detection: VAND 2025 Challenge at CVPR 2025
We’re thrilled to announce the Visual Anomaly and Novelty Detection (VAND) 2025 challenge, a premier event at CVPR 2025. Sponsored by Voxel51, Intel, and MVTec, this challenge aims to push the boundaries of anomaly detection in industrial application…
Read more
MVTec
MVTec Deep Learning Tool 25.04 is out now
On April 30, 2025, we released the new version 25.04 of the MVTec Deep Learning Tool and thus consistently further developed our portfolio for AI-based machine vision.
Read more
Deep Learning Tool
MVTec on Campus celebrates 5 years with Vision Hero campaign
MVTec Software GmbH is proud to announce the 5-year anniversary of its successful educational initiative MVTec on Campus. To mark this special milestone, MVTec is launching a unique and engaging campaign: Vision Heroes – Saving Yogurt Village.
Read more
MVTec
MVTec MERLIC 5.7 is available now
With the new version MERLIC 5.7, MVTec continues their established path with MERLIC – easy process integration combined with powerful machine vision methods. The new version improves the usability of MERLIC Runtime Environment (RTE) and optimizes the…
Read more
MERLIC
New MVTec Academy course "Read bar codes"
This basic training teaches you how to read bar codes with HALCON and MERLIC.
Read more
Academy
HALCON
MERLIC
Mission Accomplished: MVTec's Christmas Quiz
As we wrap up our Christmas quiz, we’re excited to share the fantastic results.
Read more
MVTec
MVTec Software