Image Processing & Bar Codes

The documents to be scanned for storage or processing of images are often captured in 8 bits per pixel. These are known as grayscale images at 256 levels of gray that can be represented in the picture. The ability to represent shades of gray is needed to accurately capture photographs and graphics, but is not normally required for the text. Accordingly, the scanned images are often binarized. This process involves selecting a threshold value, then changing all pixel values below this threshold and black, and all pixel values above the threshold white. This compresses the image that requires only 1 bit per pixel instead of 8 bits per pixel. For example, a 8.5-inch by 11 inch document scanned at 200 samples per inch, has reduced its requirement for storage of 450 kilobytes to 3.6 megabytes. Binarization also occurs when documents are transmitted by fax to create the images that are represented with 1 bit per pixel, too.

Given a threshold binarized images containing text can usually be read by any human eye or OCR algorithms. In fact, some algorithms begin the process of OCR OCR binarizing the image and the text is usually dark against a light background. However, if bar codes are present in the binarized image can be altered by enough about the process of binarization difficult because of a decoding algorithm. The image on the left (http://www.omniplanar.com/_upload/CodePics/Code39-GreyscaleWeb.gif) shows the beginning of a pattern Code 39 linear bar code. The upper part shows the rendered image of 8 bits per pixel, while the bottom shows a version binarized using a threshold of 100. Note that the smooth transitions from white to black in grayscale image have become ragged edges that roughly one pixel of the variability. As a result, the width of each bar or space may vary by plus or minus 2 pixels. Since the information in linear bar codes found in the width of the bars and spaces, can cause problems in decoding the size and type of the original bar code symbol. The rest of this article will focus on two issues that should be considered to improve the rate of bar code reading binarized displays the density and type of symbology.

Density of the sample

Sample density is the number of samples per unit area that captures an image. Densities typical sample used for the processing of documents ranging from 200 to 300 samples per inch (dots per inch or dpi). Fax transmission can vary from 100 to 400 dpi. In the decoding of bar codes, a more important factor to consider is the samples per module, where module size is the smallest size of the role of the bar code. This distance is also known as Dimension X. This parameter shows includes both the density of the image capture device, along with the size of bar code scanning. If the decoding of a barcode software requires a minimum of 1.6 pixels per module linear bar codes in a grayscale image. From above, if the width of a bar or space may vary from 2 pixels binarization then you can see that problems may exist in the short-widths in this sample density. It is therefore recommended that a typical value of 4 pixels per module barcode is binarized. A scanned document to 200 dpi, this requires a minimum size in the form of bar code printed 020 inchs or 20 mils. Increased samples beyond 4 per module is also recommended for images that are going through many processes such as binarization documents to be faxed multiple times.

Type symbol

The choice of symbols used to encode the data must be carefully considered. Linear (or 1D) bar codes can be classified into two distinct groups: wide / narrow width of multiple codes and codes. In a wide / close of each bar code or in space can only be narrow or broad. To reduce the large proportion, which gives the relationship between the size of two widths, usually ranges between 2 and 3. Popular symbologies using only 2 widths include Code 39, Interleaved 2 of 5. Across multiple codes of more than 2 options for the width of the bars and spaces. Symbologies popular employing more than two widths include the UPC and Code 128, which allows a bar or space to be 1, 2, 3 or 4 modules. Given the same samples per module, wide / narrow symbologies usually survive the process of binarization read rate of return higher than their multi-wide. This is simply due to the fact that in the presence of edge binarization because the change is easier to determine if a race is wide 3X X (where X is the length of a module and an alleged relationship with narrow width of 3 ) or if 1X, 2X, 3X or 4X such as multiple symbologies wide. The following table classifies some popular linear symbologies in the two categories above.

Wide / narrow

Codabar
Code 39
Interleaved 2 of 5
Patch code

Multiple Width

Code 128
Code 93
RSS
UPC

While wide / narrow symbologies are preferred in applications where binarization happen, usually do not have a database of high-density (the data stored per unit length), compared with multiple symbologies with the same width X dimension. This may be an issue in which a limited space in the document sets the bar code symbol.

2D symbologies

2D (two dimensional or) matrix symbologies are typically presence / absence of codes. They use a grid of cells for possible positions, and the presence or absence of a table cell location encodes data. Two-dimensional symbols have much higher density of data 1D code information is stored in both dimensions of the symbol. Moreover, usually the error correction to provide redundancy in case some data values of cells can not be determined. When a 2D symbol is sufficient binarized samples per module (the size of a grid position), they tend to do better than linear codes such as the edge information is so critical is the position of the center of the cell that is more important. Decoding software may require a minimum of 2.75 points per module in a grayscale image for reliable operation. If additional samples per module is always beyond 2.75, the performance continues to improve and is a good choice for images to be subjected to multiple binarizations. A sample density of pixels of 5 or more for 2D matrix symbologies gives good performance after reading binarization. Popular 2D matrix codes include Data Matrix, QR Code, and Aztec Code.

PDF417 is often referred to as a 2D symbol. However, it is not a real source of the array. This is a stacked linear code, which consists of several rows of short linear codewords. It allows the bars and spaces for up to 6 different widths and, as such, may be negatively affected by lower binarization samples per module.

Abstract

In applications containing the scanned documents are bar codes that binarized read rate performance can be improved through the use of linear symbologies used only at / options narrow bars and spaces along it least 4 or more pixels per module. Two-dimensional matrix codes are a good option when used with a binarization minimumof 5 pixels per module, and provide the additional benefit of increasing the density of data from bar code symbol.

Bookmark and Share

0 Comments on “Image Processing & Bar Codes”

Leave a Comment

There are a large number of different types of barcodes. Think of barcodes as spoken languages, each one different from the others. Every barcode type is designed to do something special. Different types of barcodes are known as barcode symbologies.

You can break barcodes down into two different major groups: linear / one dimensional barcodes, and two dimensional barcodes. Two dimensional barcodes can pack a lot of data into a small space, but most inexpensive barcode scanners will not read them.

So if you need a bar code that is easy to print and can be read by virtually any scanner, you need a linear or one dimensional bar code. A linear bar code is composed of bars and spaces all in a single line. Linear bar codes can not hold a lot of data- typically no more than about 9 data characters for every inch of horizontal barcode space.

So what are the major types of linear barcodes and how do you choose the right one? A good web site that will help you pick the type of barcode you need is the one and only Poochy Bar Code Blog ;)