Operators |
gen_1d_bar_code_descr_gen — Generate a generic description of a 1D bar code.
gen_1d_bar_code_descr_gen is obsolete and is only provided for reasons of backward compatibility. New applications for reading bar codes should use the functionalities in the chapter Identification / Bar Code instead (see create_bar_code_model).
gen_1d_bar_code_descr_gen( : : MinCodeLength, MaxCodeLength, ElementSizes, StartElement, StopElement, MaxSizeRatio, DiscreteCode : BarCodeDescr)
gen_1d_bar_code_descr_gen generates a generic description of a one dimensional bar code. This operator is used if the bar code description cannot be generated by gen_1d_bar_code_descr but nonetheless has to be found by using the operators find_1d_bar_code or find_1d_bar_code_region. Note that in this case the bar code cannot be deccoded by decode_1d_bar_code. Thus in this case the decoding has to be done by the user.
The values for DiscreteCode and ElementSizes have to be set correctly in any case. The other values are not so important for the extraction because they can be estimated by the system automatically.
Minimum length of the code in modules (including start and stop elements).
Default value: 30
List of values: -1, 30, 60, 90, 110, 130, 150, 200
Maximum length of the code in modules (including start and stop elements).
Default value: 30
List of values: -1, 30, 60, 90, 110, 130, 150, 200
Number of different element sizes.
Default value: 2
List of values: 1, 2, 3, 4, 5, 6, 7
List of elements of the start sequence. The width of an element is given as the number of modules. Gaps are given as negative values.
Default value: [1,-1]
List of elements of the stop sequence. The width of an element is given as the number of modules. Gaps are given as negative values.
Default value: [1,-1]
Maximum ratio length to height.
Default value: 2.5
List of values: -1.0, 2.0, 3.0, 4.0, 5.0, 6.0
Discrete code (ignore white elements).
Default value: 'false'
List of values: 'false' , 'true'
Description of a bar code class.
HTuple empty; // empty list of values HTuple BarCodeDescr; HTuple BarcodeFound,Elements,Orientation; HTuple DiscreteBarCode; Hobject Image,CodeRegion; gen_1d_bar_code_descr_gen(20,40,2,empty,empty,-1.0,"false",&BarCodeDescr); find_1d_bar_code(Image,&CodeRegion,BarCodeDescr,empty,empty, &BarcodeFound,&Elements,&Orientation); if (BarcodeFound[0].l) { discrete_1d_bar_code(Elements,BarCodeDescr,&DiscreteBarCode); for (int i=0; i<DiscreteBarCode.Num(); i++) { int NumModules = DiscreteBarCode[i]; } }
The operator gen_1d_bar_code_descr_gen returns the value 2 (H_MSG_TRUE) if the transfered values are correct.
find_1d_bar_code, find_1d_bar_code_region
Bar Code
Operators |