Operators |
gen_2d_bar_code_descr — Generate a generic description of a 2D bar code class.
gen_2d_bar_code_descr 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).
gen_2d_bar_code_descr( : : CodeType, GenParamNames, GenParamValues : BarCodeDescr)
gen_2d_bar_code_descr creates a generic description of a 2D bar code. This description consists of the type of the bar code and further characteristic features of the code.
The parameter CodeType specifies the type of the 2D bar code. Currently, the following types are supported:
Data Matrix type ECC 200.
The bar code can be described more closely using the parameters GenParamNames and GenParamValues, which form pairs of descriptors and values. The following parameters describe the size and the form of the symbols:
Exact number of columns of the symbol.
GenParamValues : 10, 12, 14, 16, 18, 20, 22, 24, 26, 32, 36, 40, 44, 48, 52, 64, 72, 80, 88, 96, 104, 120, 132, 144
default: -
Minimum number of columns.
GenParamValues : 10...144 (even)
default: 10
Maximum number of columns.
GenParamValues : 10...144 (even)
Exact number of rows of the symbol.
GenParamValues : 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 32, 36, 40, 44, 48, 52, 64, 72, 80, 88, 96, 104, 120, 132, 144
default: -
Minimum number of rows.
GenParamValues : 8...144 (even)
default: 8
Maximum number of rows.
GenParamValues : 8...144 (even)
default: 144
Form of the symbol.
GenParamValues : 'square', 'rectangle', 'any'
default: 'any'
The following parameters describe the printing method and the appearance of the bar code:
Appearance of bits corresponding to a logical 1 (foreground). 2D bar codes can be printed dark on light or vice versa. If the appearance of bits corresponding to a logical 1 can be specified in advance, computing time will be significantly reduced, especially when looking for regions that might contain a bar code (operator find_2d_bar_code). GenParamValues: 'any': unknown appearance
'dark','black': symbols are printed dark on light
'light','white': symbols are printed light on dark
default: 'any'
Method used for printing the 2D bar code. By specifying this parameter, image processing can be optimized. GenParamValues: 'printed': Standard black-and-white printing. Modules appear as square regions; neighboring modules with the same value form one region.
'engraved_darkfield': Modules with the value 1 are engraved into the surface, e.g. by a laser. Using dark field lighting these modules appear as dark round dots with a white corona; neighboring modules with the value 1 are therefore separated by gaps.
'engraved_lightfield': Similar to 'engraved_darkfield', but using light field lighting. Modules with the value 1 therefore appear as light dots with a dark corona; neighboring modules with the value 1 are again separated by gaps.
default: 'printed'
Type of the 2D bar code.
Default value: 'Data Matrix ECC 200'
List of values: 'Data Matrix ECC 200'
List of names of generic parameters describing the 2D bar code class.
Default value: []
List of values: 'columns' , 'columns_max' , 'columns_min' , 'foreground' , 'mode' , 'rows' , 'rows_max' , 'rows_min' , 'shape'
List of values of the generic parameters describing the 2D bar code class.
Default value: []
List of values: 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 32, 36, 40, 44, 48, 52, 64, 72, 80, 88, 96, 104, 120, 132, 144, 'any' , 'dark' , 'engraved_darkfield' , 'engraved_lightfield' , 'light' , 'printed' , 'rectangle' , 'square'
Description of the 2D bar code class.
gen_2d_bar_code_descr ('Data Matrix ECC 200', ['mode','foreground'], \ ['printed','dark'], BarCodeDescr)
The operator gen_2d_bar_code_descr returns the value 2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception will be raised.
Data Code
Operators |