Operator Reference

set_data_code_2d_paramT_set_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param (Operator)

set_data_code_2d_paramT_set_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param — Set selected parameters of the 2D data code model.

Signature

set_data_code_2d_param( : : DataCodeHandle, GenParamName, GenParamValue : )

Herror T_set_data_code_2d_param(const Htuple DataCodeHandle, const Htuple GenParamName, const Htuple GenParamValue)

void SetDataCode2dParam(const HTuple& DataCodeHandle, const HTuple& GenParamName, const HTuple& GenParamValue)

void HDataCode2D::SetDataCode2dParam(const HTuple& GenParamName, const HTuple& GenParamValue) const

void HDataCode2D::SetDataCode2dParam(const HString& GenParamName, const HString& GenParamValue) const

void HDataCode2D::SetDataCode2dParam(const char* GenParamName, const char* GenParamValue) const

void HDataCode2D::SetDataCode2dParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const   ( Windows only)

static void HOperatorSet.SetDataCode2dParam(HTuple dataCodeHandle, HTuple genParamName, HTuple genParamValue)

void HDataCode2D.SetDataCode2dParam(HTuple genParamName, HTuple genParamValue)

void HDataCode2D.SetDataCode2dParam(string genParamName, string genParamValue)

def set_data_code_2d_param(data_code_handle: HHandle, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, str, float]]) -> None

Description

The operator set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param is used to set or change the different parameters of a 2D data code model in order to adapt the model to a particular symbol appearance. All parameters can also be set while creating a 2D data code model with create_data_code_2d_modelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModelcreate_data_code_2d_model. The current configuration of the data code model can be queried with get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParamget_data_code_2d_param. A list with the names of all parameters that can be set for the given 2D data code type is returned by query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_params.

For an explanation of the concept of the 2D data code reader see the introduction of chapter Identification / Data Code.

Note that the symbol structure of GS1 DataMatrix, GS1 QR Code, GS1 Aztec Code, and GS1 DotCode is identical to the structure of Data Matrix ECC 200, QR Code, Aztec Code, and DotCode, respectively. Therefore, all symbology specific parameters applying to Data Matrix ECC 200, QR Code, Aztec Code, or DotCode apply to their corresponding GS1variant as well. In the following, the explicit enumeration of the parameters for any particular GS1 code is omitted for sake of readability. Instead, the relevant parameters names are to be inferred from the parameters for the corresponding non-GS1 code type or can be explicitly queried by query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_params with parameter 'set_model_params'"set_model_params""set_model_params""set_model_params""set_model_params".

The following overview lists the different generic parameters with the respective value ranges and default values in standard mode ('standard_recognition'"standard_recognition""standard_recognition""standard_recognition""standard_recognition"). If the default values in enhanced mode ('enhanced_recognition'"enhanced_recognition""enhanced_recognition""enhanced_recognition""enhanced_recognition") differ from those in the standard mode, they are listed additionally. The same holds, if the default values in the maximum mode 'maximum_recognition'"maximum_recognition""maximum_recognition""maximum_recognition""maximum_recognition" differ from those in the enhanced mode:

Basic default settings:

  • All data code types:

    'default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters":

    Reset all model parameters to one of the three basic default settings standard, enhanced, or maximum (see the following summary and create_data_code_2d_modelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModelcreate_data_code_2d_model). In addition to the parameter values, the training state of the model is reset.

    List of values: 'standard_recognition'"standard_recognition""standard_recognition""standard_recognition""standard_recognition", 'enhanced_recognition'"enhanced_recognition""enhanced_recognition""enhanced_recognition""enhanced_recognition", 'maximum_recognition'"maximum_recognition""maximum_recognition""maximum_recognition""maximum_recognition"

    Default: 'standard_recognition'"standard_recognition""standard_recognition""standard_recognition""standard_recognition"

    Attention: If this parameter is set together with a list of other parameters, this parameter must be at the first position.

    'trained'"trained""trained""trained""trained":

    Set for the given parameters the training state to trained. The next training will not overwrite this parameters. If necessary only the parameter range is extended to cover the already trained symbols. For all possible parameters which can be trained see find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d. With 'all'"all""all""all""all" the training state of all trainable parameters is set to trained.

Size and shape of the symbol:

  • Data Matrix ECC 200 (including the finder pattern):

    Attention: After calling set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param to change size or shape of the symbol, the parameters are evaluated in the given order. After each parameter, the consistency of the current settings is checked, and if necessary the current settings are adjusted. Therefore the order in which the changes are done may influence the final setting.

    'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min":

    Minimum number of module columns in the symbol.

    Value range: [10, 12, 14, .. 144]

    Attention: Changing 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" sets 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'any'"any""any""any""any". If the size of the current symbol is only consistent with one shape type 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" is restricted to 'rectangle'"rectangle""rectangle""rectangle""rectangle" or 'square'"square""square""square""square".

    Default: 10

    'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max":

    Maximum number of module columns in the symbol.

    Value range: [10, 12, 14, .. 144]

    Attention: Changing 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max" sets 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'any'"any""any""any""any". If the size of the current symbol is only consistent with one shape type 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" is restricted to 'rectangle'"rectangle""rectangle""rectangle""rectangle" or 'square'"square""square""square""square".

    Default: 144

    'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min":

    Minimum number of module rows in the symbol.

    Value range: [8, 10, 12, .. 144]

    Attention: Changing 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" sets 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'any'"any""any""any""any". If the size of the current symbol is only consistent with one shape type 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" is restricted to 'rectangle'"rectangle""rectangle""rectangle""rectangle" or 'square'"square""square""square""square".

    Default: 8

    'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max":

    Maximum number of module rows in the symbol.

    Value range: [8, 10, 12, .. 144]

    Attention: Changing 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" sets 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'any'"any""any""any""any". If the size of the current symbol is only consistent with one shape type 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" is restricted to 'rectangle'"rectangle""rectangle""rectangle""rectangle" or 'square'"square""square""square""square".

    Default: 144

    'symbol_cols'"symbol_cols""symbol_cols""symbol_cols""symbol_cols":

    Set 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" and 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max" to the given value.

    Value range: [10, 12, 14, .. 144]

    Attention: Changing 'symbol_cols'"symbol_cols""symbol_cols""symbol_cols""symbol_cols" sets 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'any'"any""any""any""any". If the size of the current symbol is only consistent with one shape type 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" is restricted to 'rectangle'"rectangle""rectangle""rectangle""rectangle" or 'square'"square""square""square""square".

    'symbol_rows'"symbol_rows""symbol_rows""symbol_rows""symbol_rows":

    Set 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" and 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" to the given value.

    Value range: [8, 10, 12, .. 144]

    Attention: Changing 'symbol_rows'"symbol_rows""symbol_rows""symbol_rows""symbol_rows" sets 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'any'"any""any""any""any". If the size of the current symbol is only consistent with one shape type 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" is restricted to 'rectangle'"rectangle""rectangle""rectangle""rectangle" or 'square'"square""square""square""square".

    'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape":

    Possible restrictions on the module shape ('rectangle'"rectangle""rectangle""rectangle""rectangle" and/or 'square'"square""square""square""square").

    Attention: setting the symbol shape all previously made restrictions concerning the symbol size may change. For 'square'"square""square""square""square" the minimum of 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" and 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" and the maximum of 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max" and 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" will be used. Additional restrictions can be seen in the following table:

    symbol_shape 'any' 'rectangle' 'square'
    'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" >= 10 >= 18 >= 10
    'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max" <= 144 <= 144 <= 144
    'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" >= 8 >= 8 >= 10
    'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" <= 144 <= 26 <= 144

    Furthermore, if 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" is larger than 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max", the setting for 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" is ignored and its value set to 'rectangle'"rectangle""rectangle""rectangle""rectangle".

    The same search algorithm is used for both shapes if 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" is set to 'low'"low""low""low""low". Thus, 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" has no effect for the symbol search in this case. However, if 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" is set to 'high'"high""high""high""high" or 'any'"any""any""any""any", the value of 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" may speed up the symbol search significantly if it is set to 'rectangle'"rectangle""rectangle""rectangle""rectangle" or 'square'"square""square""square""square".

    List of values: 'rectangle'"rectangle""rectangle""rectangle""rectangle", 'square'"square""square""square""square", 'any'"any""any""any""any"

    Default: 'any'"any""any""any""any"

    'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min":

    Set 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" and 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" to the given value and 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'square'"square""square""square""square".

    'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max":

    Set 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max" and 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" to the given value and 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'square'"square""square""square""square".

    'symbol_size'"symbol_size""symbol_size""symbol_size""symbol_size":

    Set 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min", 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max", 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" and 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" to the given value and 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" to 'square'"square""square""square""square".

  • QR Code (including the finder pattern):

    'model_type'"model_type""model_type""model_type""model_type":

    Type of the QR Code model. The old QR Code Model 1 (which has been removed from ISO/IEC 18004 in 2006) and the newer Model 2 are supported. With the specification 'any'"any""any""any""any" or '0'"0""0""0""0" both models are carried out.

    List of values: 1, 2, 'any'"any""any""any""any", '0'"0""0""0""0"

    Default: 2 (enhanced: 2, maximum: 'any'"any""any""any""any")

    'version_min'"version_min""version_min""version_min""version_min":

    Minimum symbol version. The symbol version is directly linked to the symbol size. Symbols of version 1 are 21x21 modules in size, version 2 = 25x25 modules, etc. up to version 40 = 177x177 modules. The maximum size of Model 1 symbols is 73x73 = version 14.

    Value range: [1 .. 40] (Model 1: [1 .. 14])

    Default: 1

    'version_max'"version_max""version_max""version_max""version_max":

    Maximum symbol version.

    Value range: [1 .. 40] (Model 1: [1 .. 14])

    Default: 40

    'version'"version""version""version""version":

    Set 'version_min'"version_min""version_min""version_min""version_min" and 'version_max'"version_max""version_max""version_max""version_max" to the same value.

    'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min":

    Minimum size of the symbol in modules. This parameter can be used as an alternative to 'version_min'"version_min""version_min""version_min""version_min".

    Value range: [21 .. 177] (Model 1: [21 .. 73])

    Default: 21

    'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max":

    Maximum size of the symbol in modules. This parameter can be used as an alternative to 'version_max'"version_max""version_max""version_max""version_max":

    Value range: [21 .. 177] (Model 1: [21 .. 73])

    Default: 177

    'symbol_size'"symbol_size""symbol_size""symbol_size""symbol_size":

    Set 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min" and 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max" to the same value.

  • Micro QR Code:

    'version_min'"version_min""version_min""version_min""version_min":

    Minimum symbol version. The symbol version is directly linked to the symbol size. Symbols are between 11x11 (version M1) and 17x17 (version M4) modules in size.

    Value range: [1 .. 4]

    Default: 1

    'version_max'"version_max""version_max""version_max""version_max":

    Maximum symbol version.

    Value range: [1 .. 4]

    Default: 4

    'version'"version""version""version""version":

    Set 'version_min'"version_min""version_min""version_min""version_min" and 'version_max'"version_max""version_max""version_max""version_max" to the same value.

    'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min":

    Minimum size of the symbol in modules. This parameter can be used as an alternative to 'version_min'"version_min""version_min""version_min""version_min".

    Value range: [11 .. 17]

    Default: 11

    'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max":

    Maximum size of the symbol in modules. This parameter can be used as an alternative to 'version_max'"version_max""version_max""version_max""version_max":

    Value range: [11 .. 17]

    Default: 17

    'symbol_size'"symbol_size""symbol_size""symbol_size""symbol_size":

    Set 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min" and 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max" to the same value.

  • PDF417:

    'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min":

    Minimum number of data columns in the symbol in codewords, i.e., excluding the codewords of the start/stop pattern and of the two row indicators.

    Value range: [1 .. 30]

    Default: 1

    'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max":

    Maximum number of data columns in the symbol in codewords, i.e., excluding the two codewords of the start/stop pattern and of the two indicators.

    Value range: [1 .. 30]

    Default: 20 (enhanced: 30)

    'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min":

    Minimum number of module rows in the symbol.

    Value range: [3 .. 90]

    Default: 5 (enhanced: 3)

    'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max":

    Maximum number of module rows in the symbol.

    Value range: [3 .. 90]

    Default: 45 (enhanced: 90)

    'symbol_cols'"symbol_cols""symbol_cols""symbol_cols""symbol_cols":

    Set 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" and 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max" to the same value.

    'symbol_rows'"symbol_rows""symbol_rows""symbol_rows""symbol_rows":

    Set 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" and 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" to the same value.

  • Aztec Code (including the finder pattern):

    'format'"format""format""format""format":

    Format of the Aztec Code: space separated list with the values 'compact'"compact""compact""compact""compact", 'full_range'"full_range""full_range""full_range""full_range", or 'rune'"rune""rune""rune""rune".

    Default: 'compact full_range'"compact full_range""compact full_range""compact full_range""compact full_range"

    'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min":

    Minimum size of the symbol in modules.

    Value range: [11 .. 151]

    Default: 11

    'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max":

    Maximum size of the symbol in modules.

    Value range: [11 .. 151]

    Default: 151

    'symbol_size'"symbol_size""symbol_size""symbol_size""symbol_size":

    Set 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min" and 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max" to the same value.

  • DotCode: A valid DotCode according to AIM DotCode Revision 4.0-1 consists of one even and one odd dimension. Within HALCON, the column dimension of a DotCode symbol is defined by the reading direction and always refers to the odd dimension.

    'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min":

    Minimum number of module columns in the symbol. Must be odd.

    Value range: [5 .. 999]

    Default: 5

    'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max":

    Maximum number of module columns in the symbol. Must be odd.

    Value range: [5 .. 999]

    Default: 999

    'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min":

    Minimum number of module rows in the symbol. Must be even.

    Value range: [4 .. 998]

    Default: 4

    'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max":

    Maximum number of module rows in the symbol. Must be even.

    Value range: [4 .. 998]

    Default: 998

    'symbol_cols'"symbol_cols""symbol_cols""symbol_cols""symbol_cols":

    Set 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min" and 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max" to the given value. Must bee odd.

    Value range: [5 .. 999]

    'symbol_rows'"symbol_rows""symbol_rows""symbol_rows""symbol_rows":

    Set 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min" and 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max" to the given value. Must be even.

    Value range: [4 .. 998]

Appearance of the modules in the image:

  • All data code types:

    'polarity'"polarity""polarity""polarity""polarity":

    Describes the polarity of the symbol in the image, i.e., the parameter determines if the symbol appears light on a dark background or dark on a light background.

    List of values: 'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light", 'light_on_dark'"light_on_dark""light_on_dark""light_on_dark""light_on_dark", 'any'"any""any""any""any".

    Default: 'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light" (enhanced: 'any'"any""any""any""any")

    'mirrored'"mirrored""mirrored""mirrored""mirrored":

    Describes whether the symbol is or may be mirrored (which is equivalent to swapping rows and columns of the symbol).

    List of values: 'no'"no""no""no""no", 'yes'"yes""yes""yes""yes", 'any'"any""any""any""any"

    Default: 'any'"any""any""any""any"

  • All data code types except Data Matrix ECC 200 and DotCode:

    'contrast_min'"contrast_min""contrast_min""contrast_min""contrast_min":

    Minimum contrast between the foreground and the background of the symbol (specified as gray value difference). This measure corresponds with the minimum gradient between the symbol's foreground and the background and is therefore also depending on the image sharpness.

    Value range: [1 .. 255]

    Default: 30 (enhanced: 10)

  • Data Matrix ECC 200, Micro QR Code, and QR Code:

    'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance":

    Describes the tolerance of the search with respect to local contrast variations (e.g., in the presence of glare or reflections). Depending on the value of the parameter two different algorithms are applied. If 'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance" is set to 'high'"high""high""high""high" the robustness in the presence of strong local contrast variations is improved. In the case where 'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance" is set to 'low'"low""low""low""low" the algorithm used is less robust to strong local contrast variations, however, it is faster and still able to handle contrast variations under normal circumstances and therefore 'low'"low""low""low""low" should be used in most cases. If 'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance" is set to 'any'"any""any""any""any" both algorithms are applied.

    List of values: 'low'"low""low""low""low", 'high'"high""high""high""high", 'any'"any""any""any""any"

    Default: 'low'"low""low""low""low" (enhanced: 'low'"low""low""low""low", maximum: 'any'"any""any""any""any")

  • All data code types except PDF417:

    'module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min":

    Minimum size of the modules in the image in pixels. Please note that for optimal reading performance a module size of at least 3-4 pixels is recommended.

    Value range: [1 .. 100]

    Default: 6 (enhanced: 2, maximum: 1)

    For DotCode:

    Default: 4 (enhanced, maximum: 2)

    'module_size_max'"module_size_max""module_size_max""module_size_max""module_size_max":

    Maximum size of the modules in the image in pixels.

    Value range: [2 .. 100]

    Default: 20 (enhanced: 100)

    For DotCode:

    Default: 100

    'module_size'"module_size""module_size""module_size""module_size":

    Set 'module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min" and 'module_size_max'"module_size_max""module_size_max""module_size_max""module_size_max" to the same value.

    The gap between modules can be set via the 'module_gap*'"module_gap*""module_gap*""module_gap*""module_gap*" parameters as explained in the following paragraph:

    It is possible to specify whether neighboring foreground modules are connected or whether there is or may be a gap between them. If the foreground modules are connected and fill the module space completely, the gap parameter can be set to 'no'"no""no""no""no". The parameter is set to 'small'"small""small""small""small" if there is a very small gap between two modules, i.e.,< 10% of the module size. It can be set to 'big'"big""big""big""big" if the gap is bigger (in relation to the module size: < 50%). The last two settings may also be useful if the foreground modules - although being connected - appear thinner as their entitled space (e.g., as a result of blooming caused by a bright illuminant). If the foreground modules appear only as very small dots, in general, an appropriate preprocessing of the image for detecting or enlarging the modules will be necessary (e.g., by gray_erosion_shapegray_erosion_shapeGrayErosionShapeGrayErosionShapegray_erosion_shape or gray_dilation_shapegray_dilation_shapeGrayDilationShapeGrayDilationShapegray_dilation_shape).

    'module_gap_min'"module_gap_min""module_gap_min""module_gap_min""module_gap_min":

    Minimum gap.

    List of values: 'no'"no""no""no""no", 'small'"small""small""small""small", 'big'"big""big""big""big" ('big'"big""big""big""big" is not available for DotCode)

    Default: 'no'"no""no""no""no"

    'module_gap_max'"module_gap_max""module_gap_max""module_gap_max""module_gap_max":

    Maximum gap.

    List of values: 'no'"no""no""no""no", 'small'"small""small""small""small", 'big'"big""big""big""big"

    For Data Matrix ECC 200, Micro QR Code, and QR Code:

    Default: 'no'"no""no""no""no" (enhanced: 'small'"small""small""small""small", maximum: 'big'"big""big""big""big")

    For DotCode:

    Default: 'no'"no""no""no""no" (enhanced: 'small'"small""small""small""small", maximum: 'small'"small""small""small""small")

    For Aztec Code:

    Default: 'small'"small""small""small""small" (enhanced: 'big'"big""big""big""big")

    'module_gap'"module_gap""module_gap""module_gap""module_gap":

    Set 'module_gap_min'"module_gap_min""module_gap_min""module_gap_min""module_gap_min" and 'module_gap_max'"module_gap_max""module_gap_max""module_gap_max""module_gap_max" to the same value.

  • All data code types except DotCode:

    'small_modules_robustness'"small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness":

    Robustness of the decoding of data codes with very small module sizes. Setting the parameter 'small_modules_robustness'"small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness" to 'high'"high""high""high""high" increases the likelihood of being able to decode data codes with very small module sizes. Additionally, in that case the minimum module size should also be adapted accordingly, thus 'module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min" and 'module_width_min'"module_width_min""module_width_min""module_width_min""module_width_min" (PDF417) should be set to the expected minimum module size and width, respectively. Setting 'small_modules_robustness'"small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness" to 'high'"high""high""high""high" can significantly increase the internal memory usage of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d. Thus, in the default case 'small_modules_robustness'"small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness" should be set to 'low'"low""low""low""low". If 'small_modules_robustness'"small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness" is set to 'high'"high""high""high""high" the maximal accepted image size is bisected (see get_systemget_systemGetSystemGetSystemget_system 'halcon_xl'"halcon_xl""halcon_xl""halcon_xl""halcon_xl"). If this image size is exceeded when calling find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d, an exception is raised.

    List of values: 'low'"low""low""low""low", 'high'"high""high""high""high"

    Default: 'low'"low""low""low""low" (enhanced: 'low'"low""low""low""low", maximum: 'high'"high""high""high""high")

  • PDF417:

    'module_width_min'"module_width_min""module_width_min""module_width_min""module_width_min":

    Minimum module width in the image in pixels.

    Value range: [1 .. 100]

    Default: 3 (enhanced: 2, maximum: 1)

    'module_width_max'"module_width_max""module_width_max""module_width_max""module_width_max":

    Maximum module width in the image in pixels.

    Value range: [2 .. 100]

    Default: 15 (enhanced: 100)

    'module_width'"module_width""module_width""module_width""module_width":

    Set 'module_width_min'"module_width_min""module_width_min""module_width_min""module_width_min" and 'module_width_max'"module_width_max""module_width_max""module_width_max""module_width_max" to the same value.

    'module_aspect_min'"module_aspect_min""module_aspect_min""module_aspect_min""module_aspect_min":

    Minimum module aspect ratio (module height to module width).

    Value range: [0.5 .. 20.0]

    Default: 1.0

    'module_aspect_max'"module_aspect_max""module_aspect_max""module_aspect_max""module_aspect_max":

    Maximum module aspect ratio (module height to module width).

    Value range: [0.5 .. 20.0]

    Default: 4.0 (enhanced: 10.0)

    'module_aspect'"module_aspect""module_aspect""module_aspect""module_aspect":

    Set 'module_aspect_min'"module_aspect_min""module_aspect_min""module_aspect_min""module_aspect_min" and 'module_aspect_max'"module_aspect_max""module_aspect_max""module_aspect_max""module_aspect_max" to the same value.

  • Data Matrix ECC 200:

    'slant_max'"slant_max""slant_max""slant_max""slant_max":

    Maximum deviation of the angle of the L-shaped finder pattern from the (ideal) right angle (the angle is specified in radians and corresponds to the distortion that occurs when the symbol is printed or during the image acquisition).

    Value range: [0.0 .. 0.5235]

    Default: 0.1745 = (enhanced: 0.5235 = )

    'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance":

    Tolerance of the search with respect to a defect or partially occluded finder pattern. The finder pattern includes the L-shaped side as well as the opposite alternating side. Dependent on this parameter, different algorithms are used during the symbol search in find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d. In one case ('low'"low""low""low""low"), it is assumed that the finder pattern is present to a high degree and shows almost no disturbances. In the other case ('high'"high""high""high""high"), the finder pattern may be defect or partially occluded without influencing the recognition and the reading of the symbol. Note, however, that in this mode the parameters for the symbol search should be restricted as narrow as possible by using set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param because otherwise the runtime of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d may significantly increase. Also note that the two algorithms slightly differ from each other in terms of robustness. This may lead to different results depending on the value of 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" even if the finder pattern of the symbol is not disturbed. For example, if 'high'"high""high""high""high" is chosen, only symbols with an equidistant module grid can be found (see below), and hence the robustness to perspective distortions is decreased. Finally, if 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" is set to 'any'"any""any""any""any" both algorithms are applied.

    List of values: 'low'"low""low""low""low", 'high'"high""high""high""high", 'any'"any""any""any""any"

    Default: 'low'"low""low""low""low" (enhanced: 'low'"low""low""low""low", maximum: 'any'"any""any""any""any")

    'alternating_pattern_tolerance'"alternating_pattern_tolerance""alternating_pattern_tolerance""alternating_pattern_tolerance""alternating_pattern_tolerance":

    Tolerance of the search with respect to the variation of the module widths along the two sides with the alternating pattern. The alternating pattern analysis is decisive if 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" is set to 'low'"low""low""low""low" (or 'any'"any""any""any""any" which includes 'low'"low""low""low""low"). Note, however, that this parameter has no effect if 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" has been set to 'high'"high""high""high""high". A total of three different values are allowed for this parameter, with a higher setting always including the lower values: 'low'"low""low""low""low" allows only a small variation of the module widths along the sides with the alternating pattern. 'medium'"medium""medium""medium""medium" first tries to meet the strict requirements of 'low'"low""low""low""low", and if this fails, a larger variation of the module widths along the sides with the alternating pattern is allowed. Finally, 'high'"high""high""high""high" includes everything that 'medium'"medium""medium""medium""medium" allowed and additionally expands the parameter space for the symbol's outer boundaries through further attempts. It also softens the relation between the number of edges detected and the symbol type used for subsequent decoding. The greater robustness in difficult cases comes with the disadvantage that 'high'"high""high""high""high" in particular can lead to a significant runtime increase. To counteract this, the parameter space should be reduced in total, e.g., by setting the expected symbol sizes as tight as possible.

    List of values: 'low'"low""low""low""low", 'medium'"medium""medium""medium""medium", 'high'"high""high""high""high"

    Default: 'low'"low""low""low""low" (enhanced: 'medium'"medium""medium""medium""medium", maximum: 'high'"high""high""high""high")

    'module_grid'"module_grid""module_grid""module_grid""module_grid":

    Describes whether the size of the modules may vary (in a specific range) or not. Dependent on this parameter different algorithms are used for calculating the module's center positions. If it is set to 'fixed'"fixed""fixed""fixed""fixed", an equidistant grid is used. Allowing a variable module size ('variable'"variable""variable""variable""variable"), the grid is aligned only to the alternating side of the finder pattern. With 'any'"any""any""any""any" both approaches are tested one after the other. Please note that the value of 'module_grid'"module_grid""module_grid""module_grid""module_grid" is ignored if 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" is set to 'high'"high""high""high""high". In this case an equidistant grid is assumed.

    List of values: 'fixed'"fixed""fixed""fixed""fixed", 'variable'"variable""variable""variable""variable", 'any'"any""any""any""any"

    Default: 'fixed'"fixed""fixed""fixed""fixed" (enhanced: 'any'"any""any""any""any")

  • QR Code:

    'position_pattern_min'"position_pattern_min""position_pattern_min""position_pattern_min""position_pattern_min":

    Number of position detection patterns that have to be visible for generating a new symbol candidate.

    Value range: [2, 3]

    Default: 3 (enhanced: 2)

  • Aztec Code:

    'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance":

    Tolerance of the search with respect to a defect or partially occluded finder pattern. Depending on this parameter, different algorithms are used during the symbol search in find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d. In one case ('low'"low""low""low""low"), it is assumed that all rings of the finder pattern can be extracted. In the other case ('high'"high""high""high""high") it is assumed that at least one of the rings of the finder pattern can be extracted. As a consequence the runtime of the reader increases, if this parameter is set to 'high'"high""high""high""high".

    List of values: 'low'"low""low""low""low", 'high'"high""high""high""high"

    Default: 'low'"low""low""low""low" (enhanced: 'high'"high""high""high""high")

    'additional_levels'"additional_levels""additional_levels""additional_levels""additional_levels":

    To increase the robustness of the Aztec Code reader, a number of additional search levels (in addition to the search levels derived from the minimum and maximum module dimensions) can be specified via this parameter. Be aware that this increases the runtime of the reader, especially if no code is found.

    Value range: [0 .. 2]

    Default: 0

General model behavior:

  • All data code types:

    'persistence'"persistence""persistence""persistence""persistence":

    Controls whether certain intermediate results of the symbol search with find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d are stored temporarily or persistently in the model. The memory requirements of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d are significantly smaller if the data is stored temporarily (default). On the other hand, by using the persistent storage it is possible to access some of the data for debugging reasons after searching for symbols, e.g., to investigate why a symbol could not be read. The memory requirements of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d can further be reduced by setting 'persistence'"persistence""persistence""persistence""persistence" to -1 such that only the data necessary for retrieving the decoded data is stored with the model. Be aware that print quality inspection can only be performed for Data Matrix ECC 200 symbols with this setting of 'persistence'"persistence""persistence""persistence""persistence".

    List of values: -1 (only decoded data), 0 (temporary), 1 (persistent)

    Default: 0

    'discard_undecoded_candidates'"discard_undecoded_candidates""discard_undecoded_candidates""discard_undecoded_candidates""discard_undecoded_candidates"

    Controls whether candidates that could not be successfully decoded are stored in the model. Set this parameter to 'yes'"yes""yes""yes""yes" to reduce the amount of memory consumed by the model. Note that in this case information about undecoded candidates cannot be queried by using get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects or get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results.

    List of values: 'yes'"yes""yes""yes""yes", 'no'"no""no""no""no"

    Default: 'no'"no""no""no""no"

    'strict_model'"strict_model""strict_model""strict_model""strict_model":

    Controls the behavior of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d while detecting symbols that could be read but that do not fit the model restrictions on the size of the symbols. They can be rejected (strict model, set to 'yes'"yes""yes""yes""yes") or returned as a result independent of their size and the size specified in the model (lax model, set to 'no'"no""no""no""no"). Please note that for DotCode symbols the module size restrictions ('module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min" and 'module_size_max'"module_size_max""module_size_max""module_size_max""module_size_max") are not checked even if 'strict_model'"strict_model""strict_model""strict_model""strict_model" is set to 'yes'"yes""yes""yes""yes".

    List of values: 'yes'"yes""yes""yes""yes" (strict), 'no'"no""no""no""no" (not strict)

    Default: 'yes'"yes""yes""yes""yes"

    'string_encoding'"string_encoding""string_encoding""string_encoding""string_encoding":

    Sets the expected string encoding of the string that is encoded in the symbol. It's possible to switch between UTF-8, Latin-1, Shift JIS and the string encoding of the current locale. If necessary, the string will be transcoded accordingly. In raw mode, the string will be passed unchanged.

    List of values: 'utf8'"utf8""utf8""utf8""utf8", 'locale'"locale""locale""locale""locale", 'latin1'"latin1""latin1""latin1""latin1", 'shiftjis'"shiftjis""shiftjis""shiftjis""shiftjis", 'raw'"raw""raw""raw""raw"

    Default: 'latin1'"latin1""latin1""latin1""latin1"

    'timeout'"timeout""timeout""timeout""timeout":

    By the use of this parameter, it is possible to abort find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d after a defined period in milliseconds. This is especially useful in cases where a maximum cycle time has to be ensured. All results gained before the timeout can be accessed by get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results. Passing values less or equal zero implies a deactivation of the timeout (default).

    The temporal accuracy is about 10 ms. It depends on several factors including the speed of your computer, the image size and the 'timer_mode'"timer_mode""timer_mode""timer_mode""timer_mode" set via set_systemset_systemSetSystemSetSystemset_system.

    find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d does not raise an exception if a timeout occurs. To check whether find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d has been interrupted, check the parameter 'aborted'"aborted""aborted""aborted""aborted" in get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results.

    Note that the timeout is ignored if find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d runs in training mode.

    Suggested values: 'false'"false""false""false""false", -1, 20 .. 100

    Default: 'false'"false""false""false""false"

    'abort'"abort""abort""abort""abort":

    Using this option, it is possible to abort find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d from another thread. When set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param is called with 'abort'"abort""abort""abort""abort", an instance of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d with the model DataCodeHandleDataCodeHandleDataCodeHandledataCodeHandledata_code_handle running in another thread is requested to abort. If there is no find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d running with this model, nothing happens.

    The operator find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d might not return immediately. It has to reach a cancellation point to ensure a proper cleanup. Depending on different factors like the computer performance this may take up to 10 ms.

    All decoded results until this moment, are still returned. Note that the parameter is ignored if find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d runs in training mode.

    Note: This is the only action with a data code handle, which can be used from different threads without requiring additional synchronization.

    Default: 'true'"true""true""true""true" (The value is not processed.)

  • All data code types except Aztec Code:

    'strict_quiet_zone'"strict_quiet_zone""strict_quiet_zone""strict_quiet_zone""strict_quiet_zone":

    Controls the behavior of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d while detecting symbols that could be read but show defects in their quiet zone. If 'strict_quiet_zone'"strict_quiet_zone""strict_quiet_zone""strict_quiet_zone""strict_quiet_zone" is set to 'yes'"yes""yes""yes""yes" the quiet zone of all decoded symbol is validated similar to the method used for print quality inspection. Symbols with poor grades for their quiet zone are not returned as a result. Their 'status'"status""status""status""status" is set to 'quiet zone is missing'"quiet zone is missing""quiet zone is missing""quiet zone is missing""quiet zone is missing". If 'strict_quiet_zone'"strict_quiet_zone""strict_quiet_zone""strict_quiet_zone""strict_quiet_zone" is set to 'no'"no""no""no""no" (this is the default case), all readable symbols are returned as a result.

    List of values: 'yes'"yes""yes""yes""yes", 'no'"no""no""no""no"

    Default: 'no'"no""no""no""no"

  • All data code types except DotCode:

    'quality_isoiec15415_aperture_size'"quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size":

    The reference image, on which the quality grades Symbol Contrast, Modulation, Reflectance Margin, and Fixed Pattern Damage are assessed, is obtained by applying a synthetic aperture (circular mean filter) on the original image. This parameter determines the filter size as the part of the module size. According to the standard, this value should be chosen between 0.5 and 0.8 depending on the application.

    For further guidance on selecting the aperture, see ISO/IEC 15415:2011 Annex D.2.

    Value range: [0 .. 1]

    Default: 0.8

    'quality_isoiec15415_reflectance_reference'"quality_isoiec15415_reflectance_reference""quality_isoiec15415_reflectance_reference""quality_isoiec15415_reflectance_reference""quality_isoiec15415_reflectance_reference":

    The contrast used to assess the quality grade Symbol Contrast is normalized with a reference grayvalue for reflectance. This value can be obtained with barium sulphate or magnesium oxide samples, i.a., see ISO/IEC 15415:2011 section 7.3.

    Value range: [1 .. 255]

    Default: 255

    'quality_isoiec15415_smallest_module_size'"quality_isoiec15415_smallest_module_size""quality_isoiec15415_smallest_module_size""quality_isoiec15415_smallest_module_size""quality_isoiec15415_smallest_module_size":

    The module size used to determine the size of the synthetic aperture. This can either be a fixed value in pixel or 'adaptive'"adaptive""adaptive""adaptive""adaptive". In the later case, the module size obtained by the preceding find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d is used. The final diameter of the filter is given by multiplying 'quality_isoiec15415_aperture_size'"quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size" with this size. See ISO/IEC 15415:2011 section 7.3.3.

    Value range: >= 0

    Default: 'adaptive'"adaptive""adaptive""adaptive""adaptive"

  • Data Matrix ECC 200:

    'quality_isoiec15415_decode_algorithm'"quality_isoiec15415_decode_algorithm""quality_isoiec15415_decode_algorithm""quality_isoiec15415_decode_algorithm""quality_isoiec15415_decode_algorithm":

    The computation of the quality grades is based on the module grid determined for print quality grading. Use this parameter to choose the algorithm used to obtain this grid.

    'robust'"robust""robust""robust""robust":

    Recommended for process control matters in which no calibrated camera and lighting setup based on ISO/IEC 15415:2011 is provided. The returned quality grades as well as the calculation of the grading parameters is in compliance with the international standard ISO/IEC 15415:2011. To compensate for variances caused by the flexibility in hardware setups additional information gathered during decoding of the code as well as assumptions regarding the hardware setups are used to increase the robustness of the quality inspection.

    'reference'"reference""reference""reference""reference":

    Recommended for verification of print quality. In compliance with the international standard ISO/IEC 15415:2011 the verification requires a specific camera calibration as well as lighting setup to return standard compliant grading results. In contrast to the standard, we explicitly apply a lower bound of 20% for the relative aperture factor during the computation of the constants , , and . Additionally, if the module size (as determined by the preceding find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d call) drops below 4 pixels, the algorithm cannot be used and all grades are reported as -1. The stated lower bounds help to define a reasonable application window for the reference decoding algorithm. Finally, all grades will be set to -1 if the algorithm fails during the module grid determination.

    Default: 'robust'"robust""robust""robust""robust"

    'decoding_scheme'"decoding_scheme""decoding_scheme""decoding_scheme""decoding_scheme":

    Controls the decoding step of Data Matrix ECC 200. When setting this to 'raw'"raw""raw""raw""raw", this allows to read symbols where the appearance and the error correction step conform to ISO/IEC 16022:2006, but where the encoding is custom. The decoded data are the error corrected data, are retrieved with the 'decoded_data'"decoded_data""decoded_data""decoded_data""decoded_data" parameter of get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results and must be further processed by the user.

    List of values: 'default'"default""default""default""default", 'raw'"raw""raw""raw""raw"

    Default: 'default'"default""default""default""default"

  • Data Matrix ECC 200, DotCode, Micro QR Code, and QR Code:

    'candidate_selection'"candidate_selection""candidate_selection""candidate_selection""candidate_selection":

    Controls the selection of candidate regions that are used for symbol detection. Setting this parameter to 'extensive'"extensive""extensive""extensive""extensive" increases the number of generated candidate regions and thus the likelihood of detecting a code. When this parameter is set to 'all'"all""all""all""all", all possible candidates are used. If 'candidate_selection'"candidate_selection""candidate_selection""candidate_selection""candidate_selection" is set to 'default'"default""default""default""default", less candidate regions are used.

    List of values: 'default'"default""default""default""default", 'extensive'"extensive""extensive""extensive""extensive",'all'"all""all""all""all" ('all'"all""all""all""all" is not available for Data Matrix ECC 200)

    For Data Matrix ECC 200:

    Default: 'default'"default""default""default""default" (enhanced: 'extensive'"extensive""extensive""extensive""extensive", maximum: 'extensive'"extensive""extensive""extensive""extensive")

    For DotCode, Micro QR Code, and QR Code:

    Default: 'default'"default""default""default""default" (enhanced: 'extensive'"extensive""extensive""extensive""extensive", maximum: 'all'"all""all""all""all")

  • DotCode:

    'max_allowed_error_correction'"max_allowed_error_correction""max_allowed_error_correction""max_allowed_error_correction""max_allowed_error_correction":

    Controls the maximum allowed error correction. Due to the high error correction capacity, it is possible to successfully decode false positive DotCode candidates. Especially candidates which only cover a small part of a real DotCode may be decoded successfully because of the error correction capabilities. This is the case because DotCode symbols can consist of almost every size. So there are fewer criteria to decide whether the candidate is valid or not. In order to tackle this problem, the parameter 'max_allowed_error_correction'"max_allowed_error_correction""max_allowed_error_correction""max_allowed_error_correction""max_allowed_error_correction" can be used to specify the percentage of maximum allowed error correction. Per default the value is set to 0.9, which means 90%. This choice helps to reduce the number of false reads without any significant impact on the number of correct decodes. Setting the value to e.g., 0.5 means, only candidates which could be decoded with maximum 50% used error correction, will be returned as successfully decoded results.

    Value range: [0.0 .. 1.0]

    Default: '0.9'"0.9""0.9""0.9""0.9"

When setting the model parameters, attention should be payed especially to the following issues:

  • Symbols whose size does not comply with the size restrictions made in the model (with the generic parameters 'symbol_rows*'"symbol_rows*""symbol_rows*""symbol_rows*""symbol_rows*", 'symbol_cols*'"symbol_cols*""symbol_cols*""symbol_cols*""symbol_cols*", 'symbol_size*'"symbol_size*""symbol_size*""symbol_size*""symbol_size*", or 'version*'"version*""version*""version*""version*") will not be read if 'strict_model'"strict_model""strict_model""strict_model""strict_model" is set to 'yes'"yes""yes""yes""yes", which is the default. This behavior is useful if symbols of a specific size have to be detected while other symbols should be ignored. On the other hand, neglecting this parameter can lead to problems, e.g., if one symbol of an image sequence is used to adjust the model (including the symbol size), but later in the application the symbol size varies, which is quite common in practice.

  • The runtime of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d depends mostly on the following model parameters, namely in cases where the requested number of symbols cannot be found in the image: 'polarity'"polarity""polarity""polarity""polarity", 'module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min" (Data Matrix ECC 200, QR Code, and Micro QR Code) and 'module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min" together with 'module_aspect_min'"module_aspect_min""module_aspect_min""module_aspect_min""module_aspect_min" (PDF417), and if the minimum module size is very small also the parameters 'module_gap_*'"module_gap_*""module_gap_*""module_gap_*""module_gap_*" (Data Matrix ECC 200, Aztec Code, QR Code, and Micro QR Code), for QR Code also 'position_pattern_min'"position_pattern_min""position_pattern_min""position_pattern_min""position_pattern_min". For Data Matrix ECC 200 symbols, if 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" is set to 'high'"high""high""high""high" or 'any'"any""any""any""any", the symbol size should be restricted with 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min", 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max", 'symbol_size'"symbol_size""symbol_size""symbol_size""symbol_size", and 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape" as narrow as possible.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

DataCodeHandleDataCodeHandleDataCodeHandledataCodeHandledata_code_handle (input_control, state is modified)  datacode_2d HDataCode2D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 2D data code model.

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the generic parameters that shall be adjusted for the 2D data code.

Default: 'polarity' "polarity" "polarity" "polarity" "polarity"

List of values: 'abort'"abort""abort""abort""abort", 'additional_levels'"additional_levels""additional_levels""additional_levels""additional_levels", 'alternating_pattern_tolerance'"alternating_pattern_tolerance""alternating_pattern_tolerance""alternating_pattern_tolerance""alternating_pattern_tolerance", 'candidate_selection'"candidate_selection""candidate_selection""candidate_selection""candidate_selection", 'contrast_min'"contrast_min""contrast_min""contrast_min""contrast_min", 'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance", 'decoding_scheme'"decoding_scheme""decoding_scheme""decoding_scheme""decoding_scheme", 'default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters", 'discard_undecoded_candidates'"discard_undecoded_candidates""discard_undecoded_candidates""discard_undecoded_candidates""discard_undecoded_candidates", 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance", 'format'"format""format""format""format", 'max_allowed_error_correction'"max_allowed_error_correction""max_allowed_error_correction""max_allowed_error_correction""max_allowed_error_correction", 'mirrored'"mirrored""mirrored""mirrored""mirrored", 'model_type'"model_type""model_type""model_type""model_type", 'module_aspect'"module_aspect""module_aspect""module_aspect""module_aspect", 'module_aspect_max'"module_aspect_max""module_aspect_max""module_aspect_max""module_aspect_max", 'module_aspect_min'"module_aspect_min""module_aspect_min""module_aspect_min""module_aspect_min", 'module_gap'"module_gap""module_gap""module_gap""module_gap", 'module_gap_max'"module_gap_max""module_gap_max""module_gap_max""module_gap_max", 'module_gap_min'"module_gap_min""module_gap_min""module_gap_min""module_gap_min", 'module_grid'"module_grid""module_grid""module_grid""module_grid", 'module_size'"module_size""module_size""module_size""module_size", 'module_size_max'"module_size_max""module_size_max""module_size_max""module_size_max", 'module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min", 'module_width'"module_width""module_width""module_width""module_width", 'module_width_max'"module_width_max""module_width_max""module_width_max""module_width_max", 'module_width_min'"module_width_min""module_width_min""module_width_min""module_width_min", 'persistence'"persistence""persistence""persistence""persistence", 'polarity'"polarity""polarity""polarity""polarity", 'position_pattern_min'"position_pattern_min""position_pattern_min""position_pattern_min""position_pattern_min", 'quality_isoiec15415_aperture_size'"quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size""quality_isoiec15415_aperture_size", 'quality_isoiec15415_decode_algorithm'"quality_isoiec15415_decode_algorithm""quality_isoiec15415_decode_algorithm""quality_isoiec15415_decode_algorithm""quality_isoiec15415_decode_algorithm", 'quality_isoiec15415_reflectance_reference'"quality_isoiec15415_reflectance_reference""quality_isoiec15415_reflectance_reference""quality_isoiec15415_reflectance_reference""quality_isoiec15415_reflectance_reference", 'quality_isoiec15415_smallest_module_size'"quality_isoiec15415_smallest_module_size""quality_isoiec15415_smallest_module_size""quality_isoiec15415_smallest_module_size""quality_isoiec15415_smallest_module_size", 'slant_max'"slant_max""slant_max""slant_max""slant_max", 'small_modules_robustness'"small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness", 'strict_model'"strict_model""strict_model""strict_model""strict_model", 'strict_quiet_zone'"strict_quiet_zone""strict_quiet_zone""strict_quiet_zone""strict_quiet_zone", 'string_encoding'"string_encoding""string_encoding""string_encoding""string_encoding", 'symbol_cols'"symbol_cols""symbol_cols""symbol_cols""symbol_cols", 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max", 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min", 'symbol_rows'"symbol_rows""symbol_rows""symbol_rows""symbol_rows", 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max", 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min", 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape", 'symbol_size'"symbol_size""symbol_size""symbol_size""symbol_size", 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max", 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min", 'timeout'"timeout""timeout""timeout""timeout", 'trained'"trained""trained""trained""trained", 'version'"version""version""version""version", 'version_max'"version_max""version_max""version_max""version_max", 'version_min'"version_min""version_min""version_min""version_min"

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value(-array) HTupleMaybeSequence[Union[int, str, float]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Values of the generic parameters that are adjusted for the 2D data code.

Default: 'light_on_dark' "light_on_dark" "light_on_dark" "light_on_dark" "light_on_dark"

Suggested values: 'standard_recognition'"standard_recognition""standard_recognition""standard_recognition""standard_recognition", 'enhanced_recognition'"enhanced_recognition""enhanced_recognition""enhanced_recognition""enhanced_recognition", 'maximum_recognition'"maximum_recognition""maximum_recognition""maximum_recognition""maximum_recognition", 'all'"all""all""all""all", 'yes'"yes""yes""yes""yes", 'no'"no""no""no""no", 'any'"any""any""any""any", 'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light", 'light_on_dark'"light_on_dark""light_on_dark""light_on_dark""light_on_dark", 'square'"square""square""square""square", 'rectangle'"rectangle""rectangle""rectangle""rectangle", 'small'"small""small""small""small", 'big'"big""big""big""big", 'fixed'"fixed""fixed""fixed""fixed", 'variable'"variable""variable""variable""variable", 'low'"low""low""low""low", 'high'"high""high""high""high", 'default'"default""default""default""default", 'extensive'"extensive""extensive""extensive""extensive", 'utf8'"utf8""utf8""utf8""utf8", 'locale'"locale""locale""locale""locale", 'raw'"raw""raw""raw""raw", 'robust'"robust""robust""robust""robust", 'reference'"reference""reference""reference""reference", 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 30, 50, 70, 90, 12, 14, 16, 18, 20, 22, 24, 26, 32, 36, 40, 44, 48, 52, 64, 72, 80, 88, 96, 104, 120, 132, 144

Example (HDevelop)

* This examples shows how a model can be adapted to a specific symbol if
* the symbol parameters are known

* Create a model for reading Data matrix ECC 200 codes
create_data_code_2d_model ('Data Matrix ECC 200', [], [], DataCodeHandle)
* Restrict the model by setting the module size
set_data_code_2d_param (DataCodeHandle, \
                        ['module_size_min','module_size_max'], [4,7])
* Change the polarity setting of the model from 'dark_on_light' to
* 'light_on_dark'
set_data_code_2d_param (DataCodeHandle, 'polarity', \
                        'light_on_dark')

* Read an image
read_image (Image, 'datacode/ecc200/ecc200_cpu_010')
* Read the symbol in the image
find_data_code_2d (Image, SymbolXLDs, DataCodeHandle, [], [], \
                   ResultHandles, DecodedDataStrings)
* Clear the model
clear_data_code_2d_model (DataCodeHandle)

Result

The operator set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param returns the value 2 ( H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception is raised.

Possible Predecessors

create_data_code_2d_modelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModelcreate_data_code_2d_model, read_data_code_2d_modelread_data_code_2d_modelReadDataCode2dModelReadDataCode2dModelread_data_code_2d_model

Possible Successors

get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParamget_data_code_2d_param, find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dfind_data_code_2d, write_data_code_2d_modelwrite_data_code_2d_modelWriteDataCode2dModelWriteDataCode2dModelwrite_data_code_2d_model

Alternatives

read_data_code_2d_modelread_data_code_2d_modelReadDataCode2dModelReadDataCode2dModelread_data_code_2d_model

See also

query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_params, get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParamget_data_code_2d_param, get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results, get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects

Module

Data Code