decode_2d_bar_code ( : : BarCodeDescr, BarCodeDimension, BarCodeData : SymbolCharacters, CorrSymbolData, DecodedData, DecodingError, StructuredAppend )
Decode 2D bar code data.
decode_2d_bar_code decodes (binary) data of a 2D bar code that has been
extracted with the help of get_2d_bar_code or get_2d_bar_code_pos.
The parameter BarCodeData contains the data values, BarCodeDimension
describes the size of the data matrix (see operator get_2d_bar_code),
and BarCodeDescr describes the 2D bar code class (see operator
gen_2d_bar_code_descr).
First, the binary data are converted into a stream of 8-bit characters
(SymbolCharacters). This stream consists of the actual, possibly erroneous
data and of additional characters used by the subsequent error correcting routine.
If all errors could be corrected, the resulting, still undecoded data is returned in the
parameter CorrSymbolData. The parameter DecodingError
contains the number of corrected errors, or a negative number if the correction failed.
Then, the data is decoded and returned as a tuple of ASCII characters in the
parameter DecodedData. If the symbol is part of a group of symbols
(ECC 200: ``Structured Append''), the parameter StructuredAppend contains the
number (place) of the symbol in the group, the overall number of symbols in the group,
and a group identifier. If the symbol is not part of a group, the first two entries
of StructuredAppend contain a 1.
Parameters
BarCodeDescr (input_control)
|
barcode_2d-array -> string / integer / real
|
|
Description of the bar code class. |
BarCodeDimension (input_control)
|
integer-array -> integer
|
|
Tuple with the dimension of the examined symbol.
In the case of ECC 200: width, height, symbol code. |
BarCodeData (input_control)
|
integer-array -> integer
|
|
Tuple with the data values of the examined symbol. |
SymbolCharacters (output_control)
|
string-array -> string
|
|
Data and error codewords of the symbol. |
CorrSymbolData (output_control)
|
integer-array -> integer
|
|
Corrected data codewords of the symbol. |
DecodedData (output_control)
|
integer-array -> integer
|
|
Decoded data characters as numbers. |
DecodingError (output_control)
|
integer -> integer
|
|
Number of errors during the decoding process. |
StructuredAppend (output_control)
|
integer-array -> integer
|
|
If the symbol belongs to a group (``structured append''):
position in the group, total symbol number, group (``file'') id. |
Result
The return value signals incorrect parameters as well as a failure
in the decoding procedure. The error code 8812, e.g., signals that
the decoded data stream contained an invalid data word. Up to now,
user-defined control words can not be handled by the operator. If
such control words are detected in the decoded data stream, the
error code 8813 is returned.
Parallelization Information
decode_2d_bar_code is reentrant and processed without parallelization.
Possible Predecessors
get_2d_bar_code
Module
Data Code
Copyright © 1996-2008 MVTec Software GmbH