Optimizing barcode recognition with IBM Datacap
What can be done to give the best results with barcode recognition?
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.
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 approximately 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, Datacap only accepts barcode images with 71% confidence or higher. To modify it to accept low confidence barcodes also, add the following action to run prior to barcode detection:
- SetMinimumConfidenceBP(1) - This is equivalent to 11% confidence. Each increment increases the required confidence 10% and higher values can be used if false barcodes are detected. A value of 4 is usually sufficient for this purpose.
- Barcode recognition has an internal barcode enhancement capability. To maintain high performance, this feature is turned off by default. If low quality barcodes are being received, it may be desired to turn on barcode enhancement, despite the performance hit. To do this, add the following action to run prior to barcode detection:
- Performing Datacap's regular image enhancement (ImageFix) prior to running any barcode recognition action is not recommended. ImageFix is designed to optimize text recognition and can actually degrade the barcode. There are some rare exceptions, and 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.
|Enterprise Content Management||Datacap Taskmaster Capture||Not Applicable||8.1.0|