ClassesClassesClassesClasses | | | | Operators

gen_1d_bar_code_descrT_gen_1d_bar_code_descrGen1dBarCodeDescrgen_1d_bar_code_descrGen1dBarCodeDescrGen1dBarCodeDescr (Operator)

Name

gen_1d_bar_code_descrT_gen_1d_bar_code_descrGen1dBarCodeDescrgen_1d_bar_code_descrGen1dBarCodeDescrGen1dBarCodeDescr — Generate a description of a 1D bar code.

Warning

gen_1d_bar_code_descrgen_1d_bar_code_descrGen1dBarCodeDescrgen_1d_bar_code_descrGen1dBarCodeDescrGen1dBarCodeDescr is obsolete and is only provided for reasons of backward compatibility. New applications for reading bar codes should use the functionality in the chapter Identification / Bar Code instead (see create_bar_code_modelcreate_bar_code_modelCreateBarCodeModelcreate_bar_code_modelCreateBarCodeModelCreateBarCodeModel).

Signature

gen_1d_bar_code_descr( : : CodeName, MinCharacters, MaxCharacters : BarCodeDescr)

Herror T_gen_1d_bar_code_descr(const Htuple CodeName, const Htuple MinCharacters, const Htuple MaxCharacters, Htuple* BarCodeDescr)

Herror gen_1d_bar_code_descr(const HTuple& CodeName, const HTuple& MinCharacters, const HTuple& MaxCharacters, HTuple* BarCodeDescr)

void HBarCode1D::Gen1dBarCodeDescr(const HTuple& CodeName, const HTuple& MinCharacters, const HTuple& MaxCharacters)

void Gen1dBarCodeDescr(const HTuple& CodeName, const HTuple& MinCharacters, const HTuple& MaxCharacters, HTuple* BarCodeDescr)

void HOperatorSetX.Gen1dBarCodeDescr(
[in] VARIANT CodeName, [in] VARIANT MinCharacters, [in] VARIANT MaxCharacters, [out] VARIANT* BarCodeDescr)

VARIANT HBarCode1DX.Gen1dBarCodeDescr(
[in] BSTR CodeName, [in] Hlong MinCharacters, [in] Hlong MaxCharacters)

static void HOperatorSet.Gen1dBarCodeDescr(HTuple codeName, HTuple minCharacters, HTuple maxCharacters, out HTuple barCodeDescr)

Description

gen_1d_bar_code_descrgen_1d_bar_code_descrGen1dBarCodeDescrgen_1d_bar_code_descrGen1dBarCodeDescrGen1dBarCodeDescr generates a description of a one dimensional bar code. This description is used for the search (find_1d_bar_codefind_1d_bar_codeFind1dBarCodefind_1d_bar_codeFind1dBarCodeFind1dBarCode or find_1d_bar_code_regionfind_1d_bar_code_regionFind1dBarCodeRegionfind_1d_bar_code_regionFind1dBarCodeRegionFind1dBarCodeRegion) and the decoding (decode_1d_bar_codedecode_1d_bar_codeDecode1dBarCodedecode_1d_bar_codeDecode1dBarCodeDecode1dBarCode) of the bar code. gen_1d_bar_code_descrgen_1d_bar_code_descrGen1dBarCodeDescrgen_1d_bar_code_descrGen1dBarCodeDescrGen1dBarCodeDescr is therefore the first operator in a program sequence for bar code processing. gen_1d_bar_code_descrgen_1d_bar_code_descrGen1dBarCodeDescrgen_1d_bar_code_descrGen1dBarCodeDescrGen1dBarCodeDescr has only to be called once at the beginning of a program. The descriptor can be used multiple times. In the case of different types of bar codes the operator has to be called once for each type.

You have to be aware that this description contains only basic informations about the bar code. Thus an arbitrary description can be used to extract almost every type of bar code. On the other hand a specific description is important for the decoding of a bar code type.

Parallelization

Parameters

CodeNameCodeNameCodeNameCodeNameCodeNamecodeName (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Name of bar code.

Default value: 'EAN 13' "EAN 13" "EAN 13" "EAN 13" "EAN 13" "EAN 13"

List of values: '2/5 Industrial'"2/5 Industrial""2/5 Industrial""2/5 Industrial""2/5 Industrial""2/5 Industrial", '2/5 Interleaved'"2/5 Interleaved""2/5 Interleaved""2/5 Interleaved""2/5 Interleaved""2/5 Interleaved", 'Codabar'"Codabar""Codabar""Codabar""Codabar""Codabar", 'Code 128'"Code 128""Code 128""Code 128""Code 128""Code 128", 'Code 39'"Code 39""Code 39""Code 39""Code 39""Code 39", 'Code 93'"Code 93""Code 93""Code 93""Code 93""Code 93", 'EAN 13 Add-On 2'"EAN 13 Add-On 2""EAN 13 Add-On 2""EAN 13 Add-On 2""EAN 13 Add-On 2""EAN 13 Add-On 2", 'EAN 13 Add-On 5'"EAN 13 Add-On 5""EAN 13 Add-On 5""EAN 13 Add-On 5""EAN 13 Add-On 5""EAN 13 Add-On 5", 'EAN 13'"EAN 13""EAN 13""EAN 13""EAN 13""EAN 13", 'EAN 8 Add-On 2'"EAN 8 Add-On 2""EAN 8 Add-On 2""EAN 8 Add-On 2""EAN 8 Add-On 2""EAN 8 Add-On 2", 'EAN 8 Add-On 5'"EAN 8 Add-On 5""EAN 8 Add-On 5""EAN 8 Add-On 5""EAN 8 Add-On 5""EAN 8 Add-On 5", 'EAN 8'"EAN 8""EAN 8""EAN 8""EAN 8""EAN 8", 'PharmaCode'"PharmaCode""PharmaCode""PharmaCode""PharmaCode""PharmaCode", 'UPC-A Add-On 2'"UPC-A Add-On 2""UPC-A Add-On 2""UPC-A Add-On 2""UPC-A Add-On 2""UPC-A Add-On 2", 'UPC-A Add-On 5'"UPC-A Add-On 5""UPC-A Add-On 5""UPC-A Add-On 5""UPC-A Add-On 5""UPC-A Add-On 5", 'UPC-A'"UPC-A""UPC-A""UPC-A""UPC-A""UPC-A", 'UPC-E Add-On 2'"UPC-E Add-On 2""UPC-E Add-On 2""UPC-E Add-On 2""UPC-E Add-On 2""UPC-E Add-On 2", 'UPC-E Add-On 5'"UPC-E Add-On 5""UPC-E Add-On 5""UPC-E Add-On 5""UPC-E Add-On 5""UPC-E Add-On 5", 'UPC-E'"UPC-E""UPC-E""UPC-E""UPC-E""UPC-E"

MinCharactersMinCharactersMinCharactersMinCharactersMinCharactersminCharacters (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Minimum number of characters (if not fixed).

Default value: 6

Suggested values: -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 25, 30

MaxCharactersMaxCharactersMaxCharactersMaxCharactersMaxCharactersmaxCharacters (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Maximum number of characters (if not fixed).

Default value: 10

Suggested values: -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 25, 30, 35, 40, 50

BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr (output_control)  barcode_1d HTupleHTupleHBarCode1D, HTupleHBarCode1DX, VARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Description of a bar code class.

Example (C++ (HALCON 5.0-10.0))

HTuple   empty;   // empty list of values
HTuple   BarCodeDescr;
HTuple   BarcodeFound,Elements,Orientation;
HTuple   Characters,Reference,IsCorrect;
Hobject  Image,CodeRegion;

gen_1d_bar_code_descr("EAN 13",13,13,&BarCodeDescr);
find_1d_bar_code(Image,&CodeRegion,BarCodeDescr,empty,empty,
                 &BarcodeFound,&Elements,&Orientation);
if (BarcodeFound[0].l)
{
  decode_1d_bar_code(Elements,BarCodeDescr,
                     &Characters,&Reference,&IsCorrect);
  if (IsCorrect[0].l)
    for (int i=0; i<Characters.Num(); i++)
    {
      char *value = Characters[i];
    }
}

Result

The operator gen_1d_bar_code_descrgen_1d_bar_code_descrGen1dBarCodeDescrgen_1d_bar_code_descrGen1dBarCodeDescrGen1dBarCodeDescr returns the value 2 (H_MSG_TRUE) if the transfered bar code name is correct.

Possible Successors

find_1d_bar_codefind_1d_bar_codeFind1dBarCodefind_1d_bar_codeFind1dBarCodeFind1dBarCode, find_1d_bar_code_regionfind_1d_bar_code_regionFind1dBarCodeRegionfind_1d_bar_code_regionFind1dBarCodeRegionFind1dBarCodeRegion

Alternatives

gen_1d_bar_code_descr_gengen_1d_bar_code_descr_genGen1dBarCodeDescrGengen_1d_bar_code_descr_genGen1dBarCodeDescrGenGen1dBarCodeDescrGen

Module

Bar Code


ClassesClassesClassesClasses | | | | Operators