Skip to content

set_bar_code_param_specificSetBarCodeParamSpecificSetBarCodeParamSpecificset_bar_code_param_specificT_set_bar_code_param_specific🔗

Short description🔗

set_bar_code_param_specificSetBarCodeParamSpecificSetBarCodeParamSpecificset_bar_code_param_specificT_set_bar_code_param_specific — Set selected parameters of the bar code model for selected bar code types

Signature🔗

set_bar_code_param_specific( barcode BarCodeHandle, string CodeTypes, attribute.name GenParamName, attribute.name GenParamValue )void SetBarCodeParamSpecific( const HTuple& BarCodeHandle, const HTuple& CodeTypes, const HTuple& GenParamName, const HTuple& GenParamValue )static void HOperatorSet.SetBarCodeParamSpecific( HTuple barCodeHandle, HTuple codeTypes, HTuple genParamName, HTuple genParamValue )def set_bar_code_param_specific( bar_code_handle: HHandle, code_types: MaybeSequence[str], gen_param_name: MaybeSequence[str], gen_param_value: Sequence[Union[float, int, str]] ) -> None

Herror T_set_bar_code_param_specific( const Htuple BarCodeHandle, const Htuple CodeTypes, const Htuple GenParamName, const Htuple GenParamValue )

void HBarCode::SetBarCodeParamSpecific( const HTuple& CodeTypes, const HTuple& GenParamName, const HTuple& GenParamValue ) const

void HBarCode::SetBarCodeParamSpecific( const HString& CodeTypes, const HString& GenParamName, const HTuple& GenParamValue ) const

void HBarCode::SetBarCodeParamSpecific( const char* CodeTypes, const char* GenParamName, const HTuple& GenParamValue ) const

void HBarCode::SetBarCodeParamSpecific( const wchar_t* CodeTypes, const wchar_t* GenParamName, const HTuple& GenParamValue ) const (Windows only)

void HBarCode.SetBarCodeParamSpecific( HTuple codeTypes, HTuple genParamName, HTuple genParamValue )

void HBarCode.SetBarCodeParamSpecific( string codeTypes, string genParamName, HTuple genParamValue )

Description🔗

The operator set_bar_code_param_specificSetBarCodeParamSpecific is used to set or change the different parameters of a bar code model for selected bar code types in order to adapt to special properties of the bar codes. Contrary to set_bar_code_paramSetBarCodeParam, only parameters for selected bar code types will be changed with set_bar_code_param_specificSetBarCodeParamSpecific. This is useful when searching different code types within one image (see section Autodiscrimination in find_bar_codeFindBarCode).

The current configuration of the bar code model for a specified bar code type can be queried with get_bar_code_param_specificGetBarCodeParamSpecific.

The following generic parameters can be set for specific bar code types:

  • 'element_size_variable'"element_size_variable": Specifies if the element size varies across a single bar code.

    List of values: 'false'"false", 'true'"true"

    Default: 'false'"false"

  • 'num_scanlines'"num_scanlines": Maximum number of scanlines used during the scanning of a (candidate) bar code.

    Suggested values: [00, 55, 1010, 2020, …]

    Default: 00

  • 'min_identical_scanlines'"min_identical_scanlines": Minimum number of decoded scanlines which return identical data to read the bar code successfully.

    Suggested values: [00, 22, 33, …]

    Default:

    Bar code Type 'min_identical_scanlines'"min_identical_scanlines"
    2/5 Industrial 2
    2/5 Interleaved 2
    all others 0
  • 'stop_after_result_num'"stop_after_result_num": Number of successfully decoded bar codes of the given code type after which the decoding will stop.

    Suggested values: [00, 11, 22, …]

    Default: 00

  • 'orientation'"orientation": Expected bar code orientation.

    Suggested values: [-90.0-90.090.090.0]

    Default: 0.00.0

  • 'orientation_tol'"orientation_tol": Orientation tolerance.

    Suggested values: [0.00.090.090.0]

    Default: 90.090.0

  • 'quiet_zone'"quiet_zone": Enforces the verification of quiet zones of a bar code symbol.

    Suggested values: 'false'"false", 'true'"true", 11, 22, 33, 44, 55

    Default: 'false'"false"

  • 'start_stop_tolerance'"start_stop_tolerance": Start/stop search criteria tolerance. Currently this is implemented only for Code 128 and GS1-128.

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

    Default: 'high'"high"

  • 'check_char'"check_char": Handling of an optional check character.

    List of values: 'absent'"absent", 'present'"present", 'preserved'"preserved"

    Default: 'absent'"absent"

  • 'composite_code'"composite_code": Find and decode a composite component.

    List of values: 'none'"none", 'CC-A/B'"CC-A/B"

    Default: 'none'"none"

  • 'min_code_length'"min_code_length": Minimum number of decoded characters.

    Default:

    Bar code Type 'min_code_length'"min_code_length"
    2/5 Industrial 3
    2/5 Interleaved 3
    all others 0
  • 'max_code_length'"max_code_length": Maximum number of decoded characters.

    Value range: [1121474836472147483647]

    Default: 21474836472147483647

Further details on these parameters can be found with the description of the operator set_bar_code_paramSetBarCodeParam.

It is possible to supply multivalue tuples for CodeTypescodeTypescode_types, GenParamNamegenParamNamegen_param_name, and GenParamValuegenParamValuegen_param_value. The n-th entry of one multivalue tuple corresponds to the n-th entry of the other multivalue tuple. The following combinations are allowed:

CodeTypescodeTypescode_types GenParamNamegenParamNamegen_param_name GenParamValuegenParamValuegen_param_value
single-valued single-valued single-valued
single-valued multi-valued multi-valued
multi-valued single-valued multi-valued
multi-valued single-valued single-valued

Execution information🔗

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🔗

BarCodeHandlebarCodeHandlebar_code_handle (input_control, state is modified) barcode → (handle)HTuple (HHandle)HBarCode, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the bar code model.

CodeTypescodeTypescode_types (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Names of the bar code types for which parameters should be set.

Default: 'EAN-13'"EAN-13"
List of values: '2/5 Industrial', '2/5 Interleaved', 'Codabar', 'Code 128', 'Code 39', 'Code 93', 'EAN-13 Add-On 2', 'EAN-13 Add-On 5', 'EAN-13', 'EAN-8 Add-On 2', 'EAN-8 Add-On 5', 'EAN-8', 'GS1 DataBar Expanded Stacked', 'GS1 DataBar Expanded', 'GS1 DataBar Limited', 'GS1 DataBar Omnidir', 'GS1 DataBar Stacked Omnidir', 'GS1 DataBar Stacked', 'GS1 DataBar Truncated', 'GS1-128', 'MSI', 'PharmaCode', 'UPC-A Add-On 2', 'UPC-A Add-On 5', 'UPC-A', 'UPC-E Add-On 2', 'UPC-E Add-On 5', 'UPC-E'"2/5 Industrial", "2/5 Interleaved", "Codabar", "Code 128", "Code 39", "Code 93", "EAN-13 Add-On 2", "EAN-13 Add-On 5", "EAN-13", "EAN-8 Add-On 2", "EAN-8 Add-On 5", "EAN-8", "GS1 DataBar Expanded Stacked", "GS1 DataBar Expanded", "GS1 DataBar Limited", "GS1 DataBar Omnidir", "GS1 DataBar Stacked Omnidir", "GS1 DataBar Stacked", "GS1 DataBar Truncated", "GS1-128", "MSI", "PharmaCode", "UPC-A Add-On 2", "UPC-A Add-On 5", "UPC-A", "UPC-E Add-On 2", "UPC-E Add-On 5", "UPC-E"

GenParamNamegenParamNamegen_param_name (input_control) attribute.name(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Names of the generic parameters that shall be adjusted for finding and decoding bar codes.

Default: 'check_char'"check_char"
List of values: 'check_char', 'composite_code', 'element_size_variable', 'max_code_length', 'min_code_length', 'min_identical_scanlines', 'num_scanlines', 'orientation', 'orientation_tol', 'quiet_zone', 'start_stop_tolerance', 'stop_after_result_num'"check_char", "composite_code", "element_size_variable", "max_code_length", "min_code_length", "min_identical_scanlines", "num_scanlines", "orientation", "orientation_tol", "quiet_zone", "start_stop_tolerance", "stop_after_result_num"

GenParamValuegenParamValuegen_param_value (input_control) attribute.name-array → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Values of the generic parameters that are adjusted for finding and decoding bar codes.

Default: 'absent'"absent"
Suggested values: 0, 1, 2, 4, 45, 90, 'true', 'false', 'present', 'absent', 'none', 'CC-A/B', 'high', 'low'0, 1, 2, 4, 45, 90, "true", "false", "present", "absent", "none", "CC-A/B", "high", "low"

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

create_bar_code_modelCreateBarCodeModel

Possible successors

find_bar_codeFindBarCode

Alternatives

set_bar_code_paramSetBarCodeParam

Module🔗

Bar Code