Optimizing barcode recognition with IBM Datacap Taskmaster Capture
Problem
What can be done to give the best recognition results in Datacap Taskmaster?
Cause
During printing, the ink can bleed or spread out over the white area, and then, during scanning, additional spreading of black may occur. As a result, the white spaces end up disappearing and the bars blend into each other. This can be seen by looking at the scanned image at high magnification. The barcode must meet the specifications after accounting for this.
Solution
To optimize barcode recognition:
- The width of the thinnest bar (called the X-dimension) must be at least one pixel, and two pixels are recommended for best results. At 200 DPI this means each bar must be at least .01 inch. Generally this translates to about 4 to 5 characters per inch.
- The X-dimension or width of the narrowest black bar and white space between bars must be at least 20 mils (1/50 inch, 1/2 mm). When scanned perfectly at 200 DPI this would result in 4 pixels, and at 300 DPI 6 pixels.
- For Code 39 symbols: a 20 mil X-dimension results in a density of approx 3.6 characters per inch. Optimally the height should be at least 1/4 inch or 15% of the width, whichever is greater, though this is not an absolute requirement. The minimum quiet zone (white space before and after the bar code) specified by the standard is 1/5 inch.
- Scanning can sometimes introduce white or black stripes on the image running in the scanning direction, typically vertical stripes if the paper is scanned in Portrait orientation. Bar codes printed in normal horizontal orientation cannot be read reliably when this occurs. It is advisable to print barcodes perpendicular to the direction of scanning. If the barcode must be printed horizontally on a page, scanning in landscape orientation will make the barcode more robust in the presence of common scanner issues.
- By default, Taskmaster Capture only accepts high confidence barcode images. To modify it to accept low confidence barcodes also, add the following action to run prior to barcode detection:
- SaveAsCurrentObjVariable (ReqConf, -1)
- Performing image enhancement (ImageFix) prior to running any barcode recognition action can possibly degrade the barcode, lowering recognition. If it is necessary to use image enhancement prior to barcode recognition, pay close attention to the configuration settings, especially vertical line removal and despeckle. To ensure image processing is not interfering with barcode recognition, test with the ImageFix() action removed.