Operators |
decode_2d_bar_code — Decode 2D bar code data.
decode_2d_bar_code is obsolete and is only provided for reasons of backward compatibility. New applications should use the functionality in the chapter Identification / Data Code for reading 2D data code symbologies instead (see create_data_code_2d_model).
decode_2d_bar_code( : : BarCodeDescr, BarCodeDimension, BarCodeData : SymbolCharacters, CorrSymbolData, DecodedData, DecodingError, StructuredAppend)
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.
Description of the bar code class.
Tuple with the dimension of the examined symbol. In the case of ECC 200: width, height, symbol code.
Tuple with the data values of the examined symbol.
Data and error codewords of the symbol.
Corrected data codewords of the symbol.
Decoded data characters as numbers.
Number of errors during the decoding process.
If the symbol belongs to a group (“structured append”): position in the group, total symbol number, group (“file”) id.
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.
Data Code
Operators |