Extract Barcodes activity

This activity recognizes and extracts barcodes from media and adds the barcodes to the media as MediumBarcode records.

Unless configured otherwise, blank pages (Empty property = true) are excluded from barcode extraction. You can test the recognition using the Preview and analysis link.

Note: This activity must be assigned to an Activities Service in order to run.

If for some reason you need to add this activity to the Process Designer, the file to add is xboundActBarcodeDetection.dll.

These settings are available when extracting barcodes from documents:

Properties tab

Barcodes

Select the barcode types to include (see Supported barcodes).

Note: Patchcode and Pharmacode barcodes cannot be detected at the same time as other barcodes but must be configured as separate steps.

Extraction mode

Select one of these options:

  • Add barcode – The recognized barcodes are added to the medium.

  • Delete existing barcodes – All previous barcodes existing on the medium are removed. Then newly recognized barcodes are added to the medium.

  • Add if value not available – Only those barcodes are added that do not have an unambiguous value.

  • Add if value and type not available – Only those barcodes are added that do not have an unambiguous type and value.

Work on empty pages

Tries to find barcodes even on supposedly blank pages.

Work on TIFF images (only)

Recognizes barcodes only on TIFF media. (Otherwise both TIFF and JPEG.)

Work on front pages (only)

Recognizes barcodes only on front pages, not on back pages.

Replace control characters (with "?")

Select this option to replace control characters in the barcode with a question mark.

Regular expression (filter)

Type a regular expression here if you want to recognize only barcodes that match this expression.

In case of conversion errors

Preview and analysis link

Opens the Preview Barcode Detection dialog.

Advanced tab

Use intensive search

The intensive search provides more accurate results but takes longer.

Read from specified search area

Use X value and Y value to specify (in pixels) the top right corner of where you want to start searching for barcodes.

Use Width and Height to specify the size of the search area in pixels.

Alternatively, click Preview and analysis and use your mouse to specify the search area.

Accept uncertain barcodes

Recognizes barcodes with confidence levels below 100%.

Confidence to accept

Minimum level of confidence in the barcode to recognize it.

Use manual settings

Select this option in order to use custom settings instead of the automatic barcode recognition settings.

Then the below settings become available.

Minimum height

The minimum height (measured in pixels) that a barcode must have in order for it to be recognized.

Maximum height

The maximum height (measured in pixels) that a barcode can have and still be recognized.

Detection mode

Mode of barcode recognition. (ClosedMore information.)

These settings are available:

  • Search for one barcode – A barcode is extracted only if exactly one barcode is recognized.

  • (Fast) search for one barcode – The first recognized barcode is extracted.

  • Multiple barcodes / Any value (without duplicates) – All recognized barcodes are extracted. Multiply recognized values are ignored.

  • Multiple barcodes / Value must be unique over the barcode – Only one value per barcode is extracted, namely the one that is clearest across the barcode.

  • Multiple barcodes / Unique value or value with highest quantity per barcode – Only one value per barcode is extracted, namely the one that is clear across the barcode.

  • Multiple barcodes / Any value (with duplicates) – All recognized barcodes are extracted.

Orientation

Reading direction given in degrees.

Scan distance

Interval (measured in pixels) within which barcodes are searched for (i.e. the horizontal spacing before and after the barcode).

Scan distance
Barcode expected
Scan distance barcode
Barcode ends
Scan distance

Tolerance

Maximum tilt of the barcode (line tolerance of X axis) in pixels.

Light margin

The minimum number of white pixels that are expected around the barcode.

Light margin on each side
Maximum gap

Note: The light margin must be wider than the widest gap and the widest black line in the barcode. If the gaps between the lines in a barcode are so large that they are recognized as a light margin, the barcode will not be extracted.

Scan distance barcode

The scanning of the image in the Y direction is carried out in steps measured by the height of the "scan distance". The value is in pixels.

The value of Scan distance barcode should be less than or equal to the value of Scan distance. You can reduce this value if barcodes are poorly printed. Optimal results are achieved by setting Scan distance barcode to 1. However, this slows performance. (The higher the value, the faster the performance.)

Maximum gap

Maximum gap (measured in lines) within a barcode. If more than the specified number of lines is searched in vain for more of the barcode, then the barcode is considered complete.

Maximum rotation

The maximum rotation at which a barcode can still be recognized. Normally 8° is sufficient. Specify a higher value only when more extreme rotation or skew is expected. The greater the angle, the longer extraction takes.

Preview and analysis link

Opens the Preview Barcode Detection dialog.

These settings are also available:

Import button

Imports settings from an XML file that was previously created using Export.

Export button

Exports the settings to an XML file. Specify the file name and location. You can then import the XML file to get the same settings. See Exporting and importing process step settings.

Check regular expression link

Opens a test form, where you can (when applicable) check a regular expression.

Configuring a process step

Troubleshooting barcodes

XBOUND activities: Overview

Process Designer plug-in