set_data_code_2d_paramT_set_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param (Operator)

Name

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_paramSetDataCode2dParamSetDataCode2dParamSetDataCode2dParamset_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_modelCreateDataCode2dModelCreateDataCode2dModelCreateDataCode2dModelcreate_data_code_2d_model. The current configuration of the data code model can be queried with get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParamGetDataCode2dParamget_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_paramsQueryDataCode2dParamsQueryDataCode2dParamsQueryDataCode2dParamsquery_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, 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_paramsQueryDataCode2dParamsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_params with parameter 'set_model_params'"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""standard_recognition"). If the default values in enhanced mode ('enhanced_recognition'"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""maximum_recognition" differ from those in the enhanced mode:

Basic default settings:

Size and shape of the symbol:

Appearance of the modules in the image:

General model behavior:

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

Execution Information

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

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

Handle of the 2D data code model.

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_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 value: 'polarity' "polarity" "polarity" "polarity" "polarity" "polarity"

List of values: 'abort'"abort""abort""abort""abort""abort", 'additional_levels'"additional_levels""additional_levels""additional_levels""additional_levels""additional_levels", 'candidate_selection'"candidate_selection""candidate_selection""candidate_selection""candidate_selection""candidate_selection", 'contrast_min'"contrast_min""contrast_min""contrast_min""contrast_min""contrast_min", 'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance", 'decoding_scheme'"decoding_scheme""decoding_scheme""decoding_scheme""decoding_scheme""decoding_scheme", 'default_parameters'"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""discard_undecoded_candidates", 'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance", 'format'"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""max_allowed_error_correction", 'mirrored'"mirrored""mirrored""mirrored""mirrored""mirrored", 'model_type'"model_type""model_type""model_type""model_type""model_type", 'module_aspect'"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_max", 'module_aspect_min'"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", 'module_gap_max'"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_gap_min", 'module_grid'"module_grid""module_grid""module_grid""module_grid""module_grid", 'module_size'"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_max", 'module_size_min'"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", 'module_width_max'"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""module_width_min", 'persistence'"persistence""persistence""persistence""persistence""persistence", 'polarity'"polarity""polarity""polarity""polarity""polarity", 'position_pattern_min'"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_aperture_size", 'slant_max'"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""small_modules_robustness", 'strict_model'"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""strict_quiet_zone", 'string_encoding'"string_encoding""string_encoding""string_encoding""string_encoding""string_encoding", 'symbol_cols'"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_max", 'symbol_cols_min'"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", 'symbol_rows_max'"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_rows_min", 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape""symbol_shape", 'symbol_size'"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_max", 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min", 'timeout'"timeout""timeout""timeout""timeout""timeout", 'trained'"trained""trained""trained""trained""trained", 'version'"version""version""version""version""version", 'version_max'"version_max""version_max""version_max""version_max""version_max", 'version_min'"version_min""version_min""version_min""version_min""version_min"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_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 value: 'light_on_dark' "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""standard_recognition", 'enhanced_recognition'"enhanced_recognition""enhanced_recognition""enhanced_recognition""enhanced_recognition""enhanced_recognition", 'maximum_recognition'"maximum_recognition""maximum_recognition""maximum_recognition""maximum_recognition""maximum_recognition", 'yes'"yes""yes""yes""yes""yes", 'no'"no""no""no""no""no", 'any'"any""any""any""any""any", 'dark_on_light'"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""light_on_dark", 'square'"square""square""square""square""square", 'rectangle'"rectangle""rectangle""rectangle""rectangle""rectangle", 'small'"small""small""small""small""small", 'big'"big""big""big""big""big", 'fixed'"fixed""fixed""fixed""fixed""fixed", 'variable'"variable""variable""variable""variable""variable", 'low'"low""low""low""low""low", 'high'"high""high""high""high""high", 'default'"default""default""default""default""default", 'extensive'"extensive""extensive""extensive""extensive""extensive", 'utf8'"utf8""utf8""utf8""utf8""utf8", 'locale'"locale""locale""locale""locale""locale", 'raw'"raw""raw""raw""raw""raw", 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_paramSetDataCode2dParamSetDataCode2dParamSetDataCode2dParamset_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_modelCreateDataCode2dModelCreateDataCode2dModelCreateDataCode2dModelcreate_data_code_2d_model, read_data_code_2d_modelread_data_code_2d_modelReadDataCode2dModelReadDataCode2dModelReadDataCode2dModelread_data_code_2d_model

Possible Successors

get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParamGetDataCode2dParamget_data_code_2d_param, find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dFindDataCode2dfind_data_code_2d, write_data_code_2d_modelwrite_data_code_2d_modelWriteDataCode2dModelWriteDataCode2dModelWriteDataCode2dModelwrite_data_code_2d_model

Alternatives

read_data_code_2d_modelread_data_code_2d_modelReadDataCode2dModelReadDataCode2dModelReadDataCode2dModelread_data_code_2d_model

See also

query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_params, get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParamGetDataCode2dParamget_data_code_2d_param, get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results, get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects

Module

Data Code