HALCON Reference Manual 10.0.2
Table of Contents / Legacy / 2D Bar Code ClassesClassesClasses | | | Operators

decode_2d_bar_codeT_decode_2d_bar_codedecode_2d_bar_codeDecode2dBarCodeDecode2dBarCode (Operator)

Name

decode_2d_bar_codeT_decode_2d_bar_codedecode_2d_bar_codeDecode2dBarCodeDecode2dBarCode — Decode 2D bar code data.

Warning

decode_2d_bar_codedecode_2d_bar_codedecode_2d_bar_codeDecode2dBarCodeDecode2dBarCode 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_modelcreate_data_code_2d_modelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModel).

Signature

decode_2d_bar_code( : : BarCodeDescr, BarCodeDimension, BarCodeData : SymbolCharacters, CorrSymbolData, DecodedData, DecodingError, StructuredAppend)

Herror T_decode_2d_bar_code(const Htuple BarCodeDescr, const Htuple BarCodeDimension, const Htuple BarCodeData, Htuple* SymbolCharacters, Htuple* CorrSymbolData, Htuple* DecodedData, Htuple* DecodingError, Htuple* StructuredAppend)

Herror decode_2d_bar_code(const HTuple& BarCodeDescr, const HTuple& BarCodeDimension, const HTuple& BarCodeData, HTuple* SymbolCharacters, HTuple* CorrSymbolData, HTuple* DecodedData, HTuple* DecodingError, HTuple* StructuredAppend)

HTuple HBarCode2D::Decode2dBarCode(const HTuple& BarCodeDimension, const HTuple& BarCodeData, HTuple* CorrSymbolData, HTuple* DecodedData, HTuple* DecodingError, HTuple* StructuredAppend) const

void HOperatorSetX.Decode2dBarCode(
[in] VARIANT BarCodeDescr, [in] VARIANT BarCodeDimension, [in] VARIANT BarCodeData, [out] VARIANT* SymbolCharacters, [out] VARIANT* CorrSymbolData, [out] VARIANT* DecodedData, [out] VARIANT* DecodingError, [out] VARIANT* StructuredAppend)

VARIANT HBarCode2DX.Decode2dBarCode(
[in] VARIANT BarCodeDescr, [in] VARIANT BarCodeDimension, [in] VARIANT BarCodeData, [out] VARIANT* CorrSymbolData, [out] VARIANT* DecodedData, [out] Hlong* DecodingError, [out] VARIANT* StructuredAppend)

static void HOperatorSet.Decode2dBarCode(HTuple barCodeDescr, HTuple barCodeDimension, HTuple barCodeData, out HTuple symbolCharacters, out HTuple corrSymbolData, out HTuple decodedData, out HTuple decodingError, out HTuple structuredAppend)

Description

decode_2d_bar_codedecode_2d_bar_codedecode_2d_bar_codeDecode2dBarCodeDecode2dBarCode decodes (binary) data of a 2D bar code that has been extracted with the help of get_2d_bar_codeget_2d_bar_codeget_2d_bar_codeGet2dBarCodeGet2dBarCode or get_2d_bar_code_posget_2d_bar_code_posget_2d_bar_code_posGet2dBarCodePosGet2dBarCodePos. The parameter BarCodeDataBarCodeDataBarCodeDataBarCodeDatabarCodeData contains the data values, BarCodeDimensionBarCodeDimensionBarCodeDimensionBarCodeDimensionbarCodeDimension describes the size of the data matrix (see operator get_2d_bar_codeget_2d_bar_codeget_2d_bar_codeGet2dBarCodeGet2dBarCode), and BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr describes the 2D bar code class (see operator gen_2d_bar_code_descrgen_2d_bar_code_descrgen_2d_bar_code_descrGen2dBarCodeDescrGen2dBarCodeDescr).

First, the binary data are converted into a stream of 8-bit characters (SymbolCharactersSymbolCharactersSymbolCharactersSymbolCharacterssymbolCharacters). 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 CorrSymbolDataCorrSymbolDataCorrSymbolDataCorrSymbolDatacorrSymbolData. The parameter DecodingErrorDecodingErrorDecodingErrorDecodingErrordecodingError 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 DecodedDataDecodedDataDecodedDataDecodedDatadecodedData. If the symbol is part of a group of symbols (ECC 200: “Structured Append”), the parameter StructuredAppendStructuredAppendStructuredAppendStructuredAppendstructuredAppend 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 StructuredAppendStructuredAppendStructuredAppendStructuredAppendstructuredAppend contain a 1.

Parallelization

Parameters

BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr (input_control)  barcode_2d-array HTupleHBarCode2D, HTupleHBarCode2DX, VARIANTHtuple (string / integer / real) (string / int / long / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Description of the bar code class.

BarCodeDimensionBarCodeDimensionBarCodeDimensionBarCodeDimensionbarCodeDimension (input_control)  integer-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Tuple with the dimension of the examined symbol. In the case of ECC 200: width, height, symbol code.

BarCodeDataBarCodeDataBarCodeDataBarCodeDatabarCodeData (input_control)  integer-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Tuple with the data values of the examined symbol.

SymbolCharactersSymbolCharactersSymbolCharactersSymbolCharacterssymbolCharacters (output_control)  string-array HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Data and error codewords of the symbol.

CorrSymbolDataCorrSymbolDataCorrSymbolDataCorrSymbolDatacorrSymbolData (output_control)  integer-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Corrected data codewords of the symbol.

DecodedDataDecodedDataDecodedDataDecodedDatadecodedData (output_control)  integer-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Decoded data characters as numbers.

DecodingErrorDecodingErrorDecodingErrorDecodingErrordecodingError (output_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of errors during the decoding process.

StructuredAppendStructuredAppendStructuredAppendStructuredAppendstructuredAppend (output_control)  integer-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

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.

Possible Predecessors

get_2d_bar_codeget_2d_bar_codeget_2d_bar_codeGet2dBarCodeGet2dBarCode

Module

Data Code


Table of Contents / Legacy / 2D Bar Code ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH