iSnare.com - Free Content Articles Directory
Authors Contents [Advanced Search][Add OpenSearch][Job Search]
Distribute your articles to thousands of article sites for only $2 and below! Read more...

Index  Computers and Technology
 

Image Processing & Bar Codes - Selecting The Right Bar Code With Image Binarization

 
[ Contact the Author] [ Send to a Friend] [ Article Publisher] [Make PDF] [ Print] [ Bookmark & Share]
 
Read our Terms of Service before reprinting this article. The submitter specified above has claimed the rights to this article.
Bob Dunphy

Documents that are scanned for image processing or storage are often captured at 8 bits per pixel. These are referred to as grayscale images in that 256 levels of gray are able to be represented in the image. The capability to represent shades of gray is required to faithfully capture photographs and graphics but is not normally needed for text. Consequently, scanned images are often binarized. This process involves the selection of a threshold value and then changing all pixel values below that threshold to black and all pixel values above the threshold to white. This compresses the image by only requiring 1 bit per pixel instead of 8 bits per pixel. For example, an 8.5 inch by 11 inch document scanned at 200 samples per inch, has its storage requirement drop from 3.6 megabytes to 450 kilobytes. Binarization also occurs when documents are transmitted by fax as images are created that are represented with 1 bit per pixel as well.

Given a proper threshold, binarized images that contain text can normally still be read by either human eye or OCR algorithms. Indeed, some OCR algorithms begin the OCR process by binarizing the image as the text is typically dark against a lighter background. However, if bar codes are present within the binarized image, they can by altered enough by the binarization process to cause difficulty for a decode algorithm. The image to the left (http://www.omniplanar.com/_upload/CodePics/Code39-GreyscaleWeb.gif) shows part of the start pattern of a Code 39 linear bar code. The top portion shows the image represented as 8 bits per pixel, while the lower portion shows a binarized version using a threshold of 100. Note that the smooth transitions from white to black in the grayscale image have been transformed into ragged edges that have plus or minus one pixel variability. As a result, the width of each bar or space can vary by plus or minus 2 pixels. Given that the information in linear bar codes is contained in the widths of the bars and spaces, decode problems can result depending on the size and type of the original bar code symbol. The remainder of this article will focus on two issues that should be considered to improve the read rate of binarized bar codes: sample density and symbology type.

Sample Density

Sample density is the number of samples per unit area that an image is captured. Typical sample densities used for document processing range from 200 to 300 samples per inch (dots per inch or DPI). Fax transmission can vary from 100 up to 400 DPI. In bar code decoding, a more important parameter to consider is the samples per module, where the module size is the size of the smallest feature of the bar code. This distance is also referred to as the X dimension. This parameter includes both the sample density of the image capture device along with the size of the bar code being scanned. If a bar code decoding software toolkit requires a minimum of 1.6 pixels per module for linear bar codes in a grayscale image. From above, if the width of a bar or space can vary by 2 pixels after binarization, one can see that problems can exist in the short widths at this low sample density. Consequently, it is recommended that a typical value of 4 pixels per module for bar codes that will be binarized. For a document scanned at 200 DPI, this requires a minimum module size in the printed bar code of .020 inchs or 20 mils. Increasing the samples per module beyond 4 is also recommended for images that will go through multiple binarization processes such as documents that will be faxed multiple times.

Symbology Type

The choice of symbology used to encode data should also be considered carefully. Linear (or 1D) bar codes can be broadly classified into two distinct groups: wide/narrow codes and multiple width codes. In a wide/narrow code, each bar or space can only be either narrow or wide. The wide to narrow ratio, which gives the size ratio between the two widths, typically ranges from 2 to 3. Popular symbologies that use only 2 widths include Code 39 and Interleaved 2 of 5. Multiple width codes have more than 2 possible choices for the widths of bars and spaces. Popular symbologies that employ more than two possible widths include UPC and Code 128, both of which allow a bar or space to be either 1, 2, 3, or 4 modules. Given the same samples per module, wide/narrow symbologies typically survive the binarization process with higher read rate performance than their multiple width counterparts. This is simply due to the fact that in the presence of edge variation due to binarization, it is easier to determine if a run is X or 3X wide (where X is the length of a module and an assumed wide to narrow ratio of 3) or if it is 1X, 2X, 3X or 4X as is the case with multiple width symbologies. The table below classifies some popular linear symbologies into the two classes mentioned 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 will occur, they do not normally have as high a data density (data stored per unit width) compared to multiple width symbologies with the same X dimension. This can be an issue where limited space on the document is provided for the bar code symbol.

2D Symbologies

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

PDF417 is often referred to as a 2D symbology. However, it is not a true matrix code. It is a stacked linear code, consisting of multiple rows of short linear codewords. It allows bars and spaces to have up to 6 different widths and as such it can be adversely affected by binarization at lower samples per module.

Summary

In applications where scanned documents containing bar codes are to be binarized, read rate performance can be improved by using linear symbologies that employ only wide/narrow choices for bars and spaces along with at least 4 or more pixels per module. Two-dimensional matrix codes are a good choice when binarization is used with a minimumof 5 pixels per module, and they provide the added benefit of increasing data density of the bar code symbol.

Important NoticeDISCLAIMER: All information, content, and data in this article are sole opinions and/or findings of the individual user or organization that registered and submitted this article at Isnare.com without any fee. The article is strictly for educational or entertainment purposes only and should not be used in any way, implemented or applied without consultation from a professional. We at Isnare.com do not, in anyway, contribute or include our own findings, facts and opinions in any articles presented in this site. Publishing this article does not constitute Isnare.com's support or sponsorship for this article. Isnare.com is an article publishing service. Please read our Terms of Service for more information.

With over 17 years of experience in the bar code industry, Bob Dunphy has been Principal Engineer at Omniplanar, Inc (http://www.omniplanar.com) since its inception. He has designed numerous CCD camera systems as well as high speed processing platforms.
Article Tags: bar [See Dictionary], code [See Dictionary], codes [See Dictionary]
Got a question about this article? Ask the community!
Article published on July 09, 2007 at Isnare.com
 
Rate this article:

An Evaluation Of 2D Barcodes In Document Processing Applications
Submitted by: Bob Dunphy

Introduction Many documents that are to be electronically processed contain barcodes to encode important information that is extracted via barcode decode software...

The Effects Of Fax Transmission On Bar Code Decoding
Submitted by: Bob Dunphy

When documents containing bar code symbols are faxed, the quality of the bar code symbol will degrade...

How to Install Aftermarket Stereo in Vauxhall Agila
Submitted by: Jack Wylde

DESCRIPTION: The radio installation in VAUXHALL AGILA Some Cars have steering controls from new and when you replace your radio...

Don't Ruin Your Laminator - 4 Reasons to Always Use a Carrier With Your Pouch Laminating Machine
Submitted by: Jeff McRitchie

One of the most important supplies you'll need when getting ready to use a pouch laminator is a carrier...

GBC ShredMaster CC195 Cross-Cut Shredder Review
Submitted by: Jeff McRitchie

If you've visited an office supply store recently or checked out paper shredders on the Internet, it probably seems like paper shredders are all alike, especially in the looks department...

Frequently Asked Questions About Spiral Coil Binding
Submitted by: Jeff McRitchie

Coil binding - also known as spiral binding - is a very popular method of binding, but it can be difficult to understand how it's done...

An Overview of the GBC C-75 Comb Binding Machine
Submitted by: Jeff McRitchie

If you are looking for an inexpensive comb binding machine for your office or home office you might be considering the GBC C75...

5 Great Features of the Rhin-O-Tuff HD6500
Submitted by: Jeff McRitchie

Designed for the heaviest duty users such as print and copy shops, binderies and large organizations, the Rhino Tuff HD6500 is a machine that offers top of the line flexibility and capacity...

Comparing the Swingline SmartCut EasyBlade and EasyBlade Plus Rotary Trimmers
Submitted by: Jeff McRitchie

At first glance, Swingline's SmartCut EasyBlade and EasyBlade Plus may look very similar, except for the price...

Five Reasons to Consider the Rhino-Tuff OD4000 Modular Binding Punch
Submitted by: Jeff McRitchie

Though it may be the smallest of Rhino's electric interchangeable punches, the OD4000 offers you about as much as a binding punch can offer...

Carnival of New Digital Camera Camcorder
Submitted by: Leo Vegner

The category of camcorder is one broad category of the old and new, dynamic and basic offing in the world of digital photography...

DirectAccess Takes the Place of VPN For Windows Seven
Submitted by: Gregg Housh

Microsoft has unveiled Direct Access for Windows 7 and Windows Server 2008, remotely connecting users to their office as if they were right there...

Looking For Reliable Software To Restore Memory Cards Files
Submitted by: Lance Edwards

Well, bad things always happen There is no exception...

Where Can You Sell Your Used Toner Cartridges?
Submitted by: Adriana N

Many hi-tech devices now come with many accessories, components, and specific parts For instance, there are many computer related devices that over time will require new parts...

History of Dell Computers
Submitted by: Adriana Noton

Dell is a well-known computer company that has been around for over 20 years Most people recognize the name and thousands of people buy new Dell products every day...

Windows 7 Buyer Info
Submitted by: Atherton Arkell

There have been so many problems with the Windows XP and Vista operating systems that when the new Windows came out, everyone wanted to be a Windows 7 buyer...

How To Install A Aftermarket Radio In BMW E87
Submitted by: Jack Wylde

TOOLS NEEDED: 10 & 13mm sockets Ratchet Wrench Flat Head Screwdriver Phillips Head Screwdriver Electrical Tape Coat Hanger or similar object Electric Drill 1/8" Drill Bit for Metal Dremel Tool (optional) Sandpaper (optional) INSTALLALING RADIO STEPS IN BMW E87: First pick out an aftermarket head unit...

Isnare.com Footer Divider

© 2004-2009. Isnare Free Articles - An Isnare Online Technologies Free Articles Project. All Rights Reserved.   Privacy Policy