Industrial Automation

    

Blog

Not all barcodes are created equal. Depending on the code, the surface material, and the marking method - whether printed, laser etched, or engraved - a code's quality can vary widely from mark to mark. When barcode quality becomes an issue and important product data is at risk of being lost due to decodability issues with bad barcodes, manufacturers may use machine vision-based barcode verification systems to evaluate the properties of marked codes to verify they are marked well enough to ensure long-term readability.  


However, manufacturers aren't marking the products they produce with the exact same code every time. In most cases, the point of marking a product with a code is to uniquely identify that product throughout operational processes. This means that each mark will vary from product to product. How can code quality be guaranteed in these cases? How can a manufacturer's verification system look at a uniquely-produced code and know whether or not that particular code is high-quality? A verification system doesn't know exactly which patterns of lines or cells it will encounter in each code that is marked during production; it can't use stored templates to know whether each code looks exactly the way it should.  

Luckily, this isn't how barcode verification systems work - you don't need to upload an endless library of match codes into your verification system to tell it which marks are good and which are bad for each case. Instead, a verification system evaluates each mark based on the mark's own unique unit of measure. This measurement is taken by the verification system when the code is imaged and used as a standard against which it measures the various properties of that single code (width, height, skew, etc.). The verification system can assume, based on this standard measurement, what a unique code should look like if all physical properties of the code adhere to this same expected base value.  

The unit of measure we're addressing here is known as a code's X-dimension, and it is the building block of each linear barcode or 2D symbol. The X-dimension defines both the size of a code and the amount of data that is encoded within it. While a code's X-dimension value is commonly determined during barcode creation using standard rules for minimum and maximum size, many users still do not understand why the X-dimension is such an important factor in the quality verification process.  


What Exactly Is an X-Dimension?  

In a 2D symbol (such as a Data Matrix or QR Code), the X-dimension refers to the height and width measurement of one cell (square element).  

In a linear 1D barcode (such as a Code 128 or UPC), the X-dimension refers to the width of the narrowest bar in the symbol.  

How Do I Know What My X-Dimension Measurement Is?  

X-dimension is measured in thousandths of an inch. A thousandth of an inch is called a " mil," and a barcode's X-dimension is commonly referred to as its " mil size." In barcode generation software, the X-dimension is user-defined when the barcode is created. If you are working with a barcode that you didn't create yourself, you can often find its X-dimension or mil size by using barcode verification software and analyzing the code's details.  


How Can the X-Dimension Affect Overall Barcode Quality?

Each element (line or cell) in a symbol is a multiplier of the width of the X-dimension. It is important to understand that while the white elements of a symbol are often called " spaces," they are not actually void of content. Barcode readers and verifiers extract data from symbols by interpreting the sizes of both dark and light elements. A linear barcode is made up of bars and spaces, and the spaces carry about half of the data. Likewise, in a 2D symbol, the white cells have the same data-encoding capacity as black cells.  

Every symbology, as unique in its patterns as a fingerprint, uses the same basic principles of measurement for verification of symbol quality.  

In UPC-A barcodes, there are only four different widths possible for bars and spaces. These variations are referred to, conveniently, as 1, 2, 3, and 4.  

The X-dimension of a UPC-A is the narrowest bar. This bar is a 1 and is one times the X-dimension. The narrowest space is also one times the X-dimension. The 2 bar or space will be two times the X-dimension. The 3 bar or space will be three times the X-dimension, and"¦ Well. You get the idea. The bars and spaces in a UPC-A code are multiples of the original X-dimension.  


In a UPC-A code, each group of four lines (bars and spaces) are required to encode one character. For example, if we want to encode a number 4, it will require four lines in a given pattern of line widths. A number 4 is encoded by a sequence of four lines with widths 1, 1, 3, and 2. The pattern of these four lines in sequence communicates the encoded character to the barcode reader.  

There is a built-in check for UPC-A codes to simplify the decoding and verification process. Note that each number is represented by a group of four lines whose values add up to seven.  


Let's say that I have a UPC-A code with a print growth flaw. That is, the ink has spread into the areas that should be spaces. A four-line set will not be measured at the proper widths for the encoded number I had intended - if the widths of each line can be measured at all - since the bars will have become wider and the spaces narrower.  

The UPC-A code offers a relatively simple example of how X-dimensions provide critical information to machines for the extraction of meaningful data. But keep in mind that the rules are different for other symbol types. A different linear code might require six lines per encoded character, and a different sum for the total line widths that represent a single character. However, the same logic applies to all codes in the sense that the X-dimension will be used as the base measurement to determine both the overall area that a single character covers, as well as the width values of each bar and space.  

How Do Verifiers Measure X-Dimensions?

In linear barcodes, verifiers use what is known as a Scan Reflectance Profile to "see" the dark bars and light spaces of a code and determine the measurement of the narrowest line. This is what the verifier will use as the code's X-dimension to take other measurements of the code's properties.  

As a point of interest, in the previous diagram you can see the Scan Reflectance Profile of a linear barcode. The top line of the Scan Reflectance Profile represents the code's Maximum Reflectance (RMax), which is the lightest white space in the code. The bottom line represents the code's Minimum Reflectance (RMin), which is the darkest bar in the code. The center line is referred to as the Global Threshold (GT).  

The bars and spaces of a linear barcode must cross the Global Threshold in order to be "seen" and measured by the verifier, so Symbol Contrast is also a critical element of barcode quality. Symbol Contrast is determined by the difference between RMax and RMin. For example, if RMax = 89% and RMin = 3%, the overall Symbol Contrast (SC) = 86%. A verification system will require that a code has at least a 50% contrast to be considered high quality. Without this level of contrast, a verifier may not be able to determine the X-dimension of a code in order to perform subsequent quality measurements.  

What about 2D Symbols?

If we look at a Data Matrix symbol, the X-dimension is the height and width of one cell, also known as cell size. Think about that for a moment. If the X-dimension is defined as the cell size, then all cells - both light and dark - should consistently be the same size. A barcode verifier will look for a standard X-dimension measurement across all cells to determine whether the barcode is printed in accurate proportions (high-quality) or not.  

The lower number (in red text followed by *) reports the RMax, or lightest white cell for this symbol, just like the top line on the Scan Reflectance Profile for a linear barcode. You can also see the RMin, or darkest black cell, at the top of the image (also in red text followed by *). Using our equation (RMax-RMin = SC), we can see that the Symbol Contrast for this Data Matrix is very high, (RMax = 93 - RMin = 16, so Symbol Contrast = 77%), indicating a high-quality symbol.  

So, given that our 2D symbol above has a Symbol Contrast of 77%, this would receive a grade of A for contrast quality.  

Once a barcode reader or verifier is able to determine the X-dimension of a 2D symbol thanks to its high contrast, it can distinguish a number of connected elements based on X-dimension measurements to identify a set that represents an encoded character. The red lines in the detail of the 2D symbol analysis shown below are referred to as UTAH shapes. Many of the UTAH shapes consists of eight cells. In our UPC-A example it took four lines (bars and spaces) to encode one character. Similarly, in a 2D Data Matrix symbol, eight cells of the same size (the symbol's X-dimension) define the encoded character. The encoded value is determined by the patterns of light and dark cells within the eight-cell group.  

How Do Verifiers Use X-Dimensions to Verify Overall Symbol Quality?

Let's use the example of a linear barcode's Scan Reflectance Profile analysis.

As transitions of reflectance are made across the Global Threshold, the verifier is counting bars and spaces, distinguishing between dark (bars) light (spaces), as well as measuring the width of bars and spaces (is it a 1, 2, 3 or 4 as required by a UPC-A symbol?). The X-dimension width is the horizontal measurement of the narrowest dark bar. The measurements of each of the other bars and spaces should equal an exact value based on a multiplier of the X-dimension width (1, 2, 3, or 4). In this image, you can see by the color-coded barcode quality grades (table in the upper right) that some line widths measure a C grade, some a B, and some an A based on their width as a multiplication of the X-dimension.  

Observing the "Ideal size in mils" for line width in the table below, you can see how the system is calculating the ideal 1, 2, 3, and 4 line widths of the barcode by using a multiplier of the X-dimension (narrowest line) of our UPC-A barcode, which the verifier has determined to be 9.4 mils.

"Mean size in mils" are the actual measurements that are being recorded by the verifier for each line in the UPC-A code. For instance, the narrowest bar (a 1 line) should be 9.4 mils, but the actual line widths for a 1 line in this code vary from 10.9 to 10.5 mils.  

Growth will indicate print growth (ink spread) if it is a positive number, or print reduction if Growth is a negative number, as observed by the verifier. This analysis can help manufacturers diagnose and address printer malfunctions or maintenance needs that may result in low-quality barcodes on the line.

Variations in X-dimensions within a single symbol can result in decodability errors. A barcode reader or verifier may misinterpret a bar, space, or cell due to incorrect widths (multipliers of the X-dimension) and yield an unintended result. Remember that once a symbol is created to proper X-dimension specifications, the symbol must not be improperly resized. If stretched or skewed, the X-dimension of a symbol could be compromised, and the lines or cells could be rendered unintelligible to the barcode reader or verifier.

Don't exit the X-dimension - let Microscan guarantee your barcode quality!  


We are here to help you with:

 - Barcode verification and analysis provided by experienced verification experts.
 - Training provided by certified GS1 Standards Professionals.
 - Verification systems certified by GS1 US.

Contact a Microscan Verification Expert and let us know how we can help you meet your requirements.

Category(s): Solutions & Applications Leave a Comment

Recent Posts


Leave a Comment

Comments

Written by on Reply