|
|
Using the bardecode Shell Tool
The Softek barcode Reader SDK extracts barcode information from image files.
The shell tool is available for Linux, Solaris and OSX.
The bardecode command provides an interface to the barcode reader toolkit from
the shell. For example, the following command will scan an image file for
barcodes and print the values:
bardecode -t any -m -f somefile.tif
The -t flag is used to describe which types of barcode should be read. Values
can be combinations of code128, code25, code39, codabar, ean8, ean13, pdf417,
upca, upce or any combined with a "|" symbol. e.g. "code39|code128|ean8".
The -m flag indicates that the tool should extract multiple barcodes from the
image rather than stopping as soon as the first barcode is detected.
You can use the shell tool to add barcode reading functionality to shell
scripts, perl and php.
|
Download for Linux
|
Any property of the toolkit can be set as follows:
--PropertyName Value
e.g.
bardecode --NoiseReduction 10 -f somefile.tif
Click here for a full list of properties.
Other Options
| -c min_length |
Minimum length of barcode. |
| -C max_length |
Maximum length of barcode. |
| -d scan_direction |
Scan direction mask 1 = Left to Right, 2 = Top to Bottom 4 = Right to Left and
8 = Bottom to Top. default is 15. The scan direction mask controls the
directions in which. the barcode reader will look for a barcode. With this
version it it now possible to scan for barcodes in any rotation with one call
to the reader. |
| -i page_index |
Page number of image indexed from 1 |
| -j jump |
Frequency at which scan lines are sampled, default is 1 |
| -k skew tolerance |
Skew tolerance 0 = off to 5 = any angle |
| -L oversample_sep |
Distance between the line samples when over-sampling is used. Default value is
3. |
| -m |
Scan for multiple barcodes |
| -M min_space_width |
Minimum space allowed for a space between bars. |
| -n noise_reduction |
Noise Reduction level (0 = off, typical value is 20. Only effective if the -d
flag specifies a purely horizontal or vertical search. |
| -N noise_reduction |
Advanced Noise Reduction (0 = off, typical value is 20). Only effective if the
-d flag specifies a purely horizontal or vertical search. |
| -o min_occurs |
Minimum number of matching scan lines, default 2 |
| -O |
Sample the scan lines in blocks of 3 with each line separated by oversample_sep
lines (see below). |
| -p pref_occurs |
Preferred number of matching scan lines, default 5. |
| -P |
Show page numbers. |
| -q quiet_size |
Number of pixels wide for the quiet zone around bar code. |
| -S file_template |
Split a multi-page TIF file into smaller TIF files. The first page of each new
file will contain a barcode The template must include %d to index the files
e.g. file%d.tif. Must be used with -m flag. |
| -t barcode_type |
Values can be code128, code25, code39, codabar, ean8, ean13, pdf417, upca, upce
or any. |
| -T color_threshold |
Set the color threshold. |
| -w |
Print TIF Warnings to STDERR. |
|