Accurate and efficient barcode inspection

Micromax Pty Ltd
By Simon Webb, Product Support Engineer, Micromax Sensors & Automation
Friday, 04 May, 2012


Standards for product and ingredient quality are continually being raised due to stringent agency regulations, increasing the importance of barcode reading, verification and grading in many inspection processes. Historically used in the pharmaceutical industry for traceability purposes, barcodes are now commonly used for a similar function in food and beverage applications, allowing a recalled product to be rapidly identified and traced back to its manufacturing source, easing the recall process.

Machine vision is often used for barcode inspection in the food and beverage industry, as the appropriate combination of vision sensor hardware, software and lighting can deliver efficient and effective analysis in these applications.

When utilised for barcode reading (BCR), a vision system can ensure each product on a packaging line contains the proper barcode - which in turn contains the proper manufacturing location and product identification data. For instance, UPC symbols include five digits of data about the specific product and five digits about the product manufacturer.

The ECC 200 Data Matrix, a two-dimensional barcode symbol type, can significantly increase the amount of data stored within a code; a single data matrix symbol can encode up to 2335 numbers of 1555 ASCII characters. In both of these cases, vision sensors capture an image of the barcode on the inspected product and then analyse the captured image to ‘decode’ the symbol, thus ‘reading’ the code to verify its contents.

Barcode grading

Vision sensors may also be applied to grade barcodes. Grading is used to ensure each product contains a clear, high-contrast and complete code that can be successfully read during the manufacturing process. Barcodes also must be successfully read once the product reaches shipping, retailers and finally, consumers.

This provides a trail of product information, from origin to expiry details. Grading is performed on an A to F scale based on a number of parameters, including ‘Symbol Contrast’, which involves how well the black and white portions of a barcode can be distinguished from one another. If the barcode does not exhibit sufficient contrast between these two elements, it may be illegible downstream.

A successful vision inspection, which is paramount to maintaining food safety and efficient data collection, will not only grade a barcode but will also reject a product if it fails the inspection. Irregularities or defects present within the codes can be detected, thus preventing future rejected products and avoiding costly returns and recalls. Barcode grading can also indicate when a system’s barcode marker needs replacement or repair. For instance, information that the device marking the barcodes may be low on ink allows companies to address the concern immediately to avoid further rejected products.

Barcode inspection through vision

Most vision sensors with BCR capabilities can distinguish a barcode placed at any orientation, on the condition that the entire code falls within the camera’s field of view. The barcode symbol’s overall size is often not a concern. Some data matrix symbols can consist of cells as small as 0.025 mm on a side, yet such marks are decipherable by a vision sensor with the proper lens.

Mustard bottles on a production line are inspected to ensure each bottle contains the correct bar code data.

Mustard bottles on a production line are inspected to ensure each bottle contains the correct barcode data.

However, in order to be successfully read, the barcode must meet certain resolution requirements. For most applications, the narrowest bar in a linear code must be at least three pixels wide in order to be legible. This parameter also applies to the cells within a data matrix.

Just as contrast is a crucial factor in effective barcode grading, the contrast between the barcode symbol and the material on which it is located is just as essential to a vision inspection’s success.

Ambient light within a factory environment frequently does not illuminate a product’s barcode evenly enough for a vision sensor to constantly obtain a clear image of the code. Even if ambient lighting is plentiful, plant windows or skylights often cause it to be inconsistent.

Poor lighting affects the vision sensor’s ability to read a barcode consistently from product to product, leading to unreliable results. A dedicated vision lighting solution produces the necessary contrast to acquire accurate, repeatable results from a vision inspection.

Of the numerous varieties of vision lighting types and techniques available, ring lights are the most commonly used illumination solution for barcode inspection. Mounted directly to the camera, ring lights surround the camera lens and aim light towards the barcode. This dedicated lighting method provides adequate and uniform lighting, allowing the vision sensor to consistently obtain an image with high accuracy. For long-lasting illumination, ring lights are available utilising LEDs, which offer a usable life of 100,000 hours.

Lighting is one of several components that constitute vision sensor hardware, which also includes the camera, processor and lens. For BCR applications, selecting vision hardware should be based on the size of the barcode and how it is positioned within the camera’s field of view. The size of a barcode symbol can vary greatly, from several centimetres to less than a millimetre wide.

The field of view provided by the lens should accommodate the barcode’s size, as well as the entire product region on which the barcode may be placed. For applications where barcodes are mechanically stamped or applied in precisely the same location each time, a smaller field of view is generally sufficient, enabling the use of a standard resolution camera in many cases.

If the barcode is hand-placed, the field of view must be expanded to include the entire product region on which it may appear. In these instances, a high-resolution camera should be used to ensure the code’s narrowest bars or cells, when captured by a camera, are at least three pixels wide.

The key to how a vision sensor interprets a barcode is the sensor’s operation as, essentially, an electronic light meter. The vision sensor’s imager chip comprises photosites - light-sensitive elements that generate an electronic signal proportional to the amount of light to which they are exposed. Each photosite on an imager chip is linked to a pixel, which portrays the obtained light value from dark to bright - ranging from 0 to 255 - on an 8-bit grayscale. In these terms, when contrast is created, it yields a greater numeric difference between pixels in the dark and bright portions of the barcode, making these variations easier to detect.

Machine vision software

The final element of a vision system is the vision software, which includes all programming and image algorithms required to monitor, analyse and control an inspection. This component establishes whether a barcode is present, if it contains the correct data and if the physical barcode symbol is legible. The BCR tool allows the vision sensor to capture the full barcode as an image containing both light and dark patterns for analysis. The sensor is then able to compare these light and dark patterns to the barcode symbol standards stored in the software. If the light/dark line and space variations can be recognised as a known barcode symbol type, the data can be decoded.

After this determination has been made, the vision sensor uses communication tools to send inspection data via serial or ethernet communications to a PLC or PC. Sensors that offer configurable I/Os do more than share the collected inspection data - they apply it by categorising products according to the data that each barcode contains, as well as diverting any incorrect or illegible barcodes from the line.

While the results of a vision inspection are comprehensive, the selection, set-up and programming of the sensor can be complex. Prompted by the explosion in touch-screen-driven consumer electronic devices from recent years, some vision sensors now offer an all-in-one solution that provides the same comprehensive inspection capabilities within a self-contained design.

This type of sensor features an integrated touch screen for on-site programming but also offers a USB port to upload and download inspection parameters and results to and from a PC.

A simple-to-apply design accelerates operator training and decreases the programming time required for setting up a barcode inspection, all while allowing users to monitor and control the inspection in real time on the plant floor, with no external PC or other components required.

With the combination of these innovations, a wide range of hardware options and sophisticated BCR capabilities, machine vision delivers a reliable, repeatable solution for barcode inspections to the food and beverage industry.

Related Articles

ST. ALi doubles capacity with second coffee packaging machine

In order to meet growing demand for its product, coffee brand ST. ALi has added another coffee...

Powdered plant milk designed to cut packaging and emissions

Bare*ly Mylk, a startup founded by Monash University alumni, has developed powdered plant milk to...

Linerless packaging design for kiwi fruit rebrand

Global kiwi supplier Zespri has collaborated with Tesco for its packaging revamp that is designed...


  • All content Copyright © 2024 Westwick-Farrow Pty Ltd