gen_2d_bar_code_descr ( : : CodeType, GenParamNames, GenParamValues : BarCodeDescr )

Generate a generic description of a 2D bar code class.

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 ECC 200'     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:

'columns'        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:        -

'columns_min'    Minimum number of columns.
                 GenParamValues: 10...144 (even)
                 default:        10

'columns_max'    Maximum number of columns.
                 GenParamValues: 10...144 (even)
                 default:        144

'rows'           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:        -

'rows_min'       Minimum number of rows.
                 GenParamValues: 8...144 (even)
                 default:        8

'rows_max'       Maximum number of rows.
                 GenParamValues: 8...144 (even)
                 default:        144

'shape'          Form of the symbol.
                 GenParamValues: 'square', 'rectangle', 'any'
                 default:        'any'

The following parameters describe the printing method and the appearance of the bar code:

'foreground'     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'


'mode'           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
                                                        1therefore appear as light dots with
                                                        a dark corona; neighboring modules with the 
                                                        value 1 are again separated by gaps.
                 default:        'printed'



Parameters

CodeType (input_control)
string -> string
Type of the 2D bar code.
Default value: ''Data Matrix ECC 200''
List of values: ''Data Matrix ECC 200''

GenParamNames (input_control)
string-array -> string
List of names of generic parameters describing the 2D bar code class.
Default value: '[]'
List of values: 'columns', 'columns_min', 'columns_max', 'rows', 'rows_min', 'rows_max', 'foreground', 'shape', 'mode'

GenParamValues (input_control)
integer-array -> integer / string / real
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, 'dark', 'light', 'square', 'rectangle', 'printed', 'engraved_darkfield', 'engraved_lightfield', 'any'

BarCodeDescr (output_control)
barcode_2d-array -> string / integer / real
Description of the 2D bar code class.


Example
gen_2d_bar_code_descr ('Data Matrix ECC 200', ['mode','foreground'], 
                       ['printed','dark'], BarCodeDescr)

Result

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.


Parallelization Information

gen_2d_bar_code_descr is reentrant and processed without parallelization.


Possible Successors

find_2d_bar_code


Module

Barcode reader



Copyright © 1996-2005 MVTec Software GmbH