Name
get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParam — Get one or several parameters that describe the 2D data code model.
The operator get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParam allows to query the
parameters that are used to describe the 2D data code model.
The names of the desired parameters are passed in the generic
parameter GenParamNamesGenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames, the corresponding values are
returned in GenParamValuesGenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues.
All these parameters can be set and changed at any time with the
operator set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam.
A list with the names of all parameters that are valid for the used
2D data code type is returned by the operator
query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParams.
Note that the symbol structure of GS1 DataMatrix, GS1 QR Code, and
GS1 Aztec is identical to the structure of ECC 200, QR Code, and Aztec Code,
respectively. Therefore, all symbology specific parameters applying to
ECC 200, QR Code, or Aztec Code apply to their corresponding GS1 variant
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_paramsQueryDataCode2dParamsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParams with parameter
'get_model_params'"get_model_params""get_model_params""get_model_params""get_model_params""get_model_params".
The following parameters can be queried - ordered by different
categories and data code types:
Size and shape of the symbol:
-
Data matrix ECC 200 (including the finder pattern):
- 'symbol_cols_min'"symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min""symbol_cols_min":
-
Minimum number of module columns in the symbol.
- 'symbol_cols_max'"symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max""symbol_cols_max":
-
Maximum number of module columns in the symbol.
- 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min":
-
Minimum number of module rows in the symbol.
- 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max":
-
Maximum number of module rows in the symbol.
- 'symbol_shape'"symbol_shape""symbol_shape""symbol_shape""symbol_shape""symbol_shape":
-
Possible restrictions concerning the module shape
(rectangle and/or square): 'square'"square""square""square""square""square",
'rectangle'"rectangle""rectangle""rectangle""rectangle""rectangle", 'any'"any""any""any""any""any". Since HALCON 7.1.1, the
same search algorithm is used for both shapes.
-
QR Code (including the finder pattern):
- 'model_type'"model_type""model_type""model_type""model_type""model_type":
-
Type of the QR Code model specification: 1,
2, 0 (for 'any'"any""any""any""any""any")
- 'version_min'"version_min""version_min""version_min""version_min""version_min":
-
Minimum symbol version to be read:
[1..40]
(Model 1: [1..14])
- 'version_max'"version_max""version_max""version_max""version_max""version_max":
-
Maximum symbol version to be read:
[1..40]
(Model 1: [1..14])
- 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min":
-
Minimum symbol size (this value is directly linked to the
version 'version_min'"version_min""version_min""version_min""version_min""version_min"):
[21..177]
(Model 1: [21..73])
- 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max":
-
Maximum symbol size (this value is directly linked to the
version 'version_max'"version_max""version_max""version_max""version_max""version_max"):
[21..177]
(Model 1: [21..73])
-
Micro QR Code:
- 'version_min'"version_min""version_min""version_min""version_min""version_min":
-
Minimum symbol version to be read:
[1..4]
- 'version_max'"version_max""version_max""version_max""version_max""version_max":
-
Maximum symbol version to be read:
[1..4]
- 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min":
-
Minimum symbol size (this value is directly linked to the
version 'version_min'"version_min""version_min""version_min""version_min""version_min"):
[11..17]
- 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max":
-
Maximum symbol size (this value is directly linked to the
version 'version_max'"version_max""version_max""version_max""version_max""version_max"):
[11..17]
-
PDF417:
- 'symbol_cols_min'"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.
- 'symbol_cols_max'"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 codewords of the start/stop
pattern and of the two row indicators.
- 'symbol_rows_min'"symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min""symbol_rows_min":
-
Minimum number of module rows in the symbol.
- 'symbol_rows_max'"symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max""symbol_rows_max":
-
Maximum number of module rows in the symbol.
-
Aztec Code (including the finder pattern):
- 'format'"format""format""format""format""format":
-
Format of the Aztec Code: space separated list with the
values 'compact'"compact""compact""compact""compact""compact", 'full_range'"full_range""full_range""full_range""full_range""full_range", or
'rune'"rune""rune""rune""rune""rune"
- 'symbol_size_min'"symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min""symbol_size_min":
-
Minimum symbol size
[11..151]
- 'symbol_size_max'"symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max""symbol_size_max":
-
Maximum symbol size
[11..151]
Appearance of the modules in the image:
-
All data code types:
- 'polarity'"polarity""polarity""polarity""polarity""polarity":
-
Possible restrictions concerning the polarity of the
modules, i.e., if they are printed dark on a light
background or vice versa: '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", 'any'"any""any""any""any""any".
- 'mirrored'"mirrored""mirrored""mirrored""mirrored""mirrored":
-
Describes whether the symbol is or may be mirrored (which is
equivalent to swapping the rows and columns of the symbol):
'yes'"yes""yes""yes""yes""yes", 'no'"no""no""no""no""no", 'any'"any""any""any""any""any".
- 'contrast_min'"contrast_min""contrast_min""contrast_min""contrast_min""contrast_min":
-
Minimum contrast between the foreground and the background
of the symbol (this measure corresponds to the minimum
gradient between the symbol's foreground and the
background).
- 'small_modules_robustness'"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""small_modules_robustness" to 'high'"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""module_size_min" and
'module_width_min'"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""small_modules_robustness" to 'high'"high""high""high""high""high" can
significantly increase the internal memory usage of
find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d. Thus, in the default case
'small_modules_robustness'"small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness""small_modules_robustness" should be set to 'low'"low""low""low""low""low".
Values: 'low'"low""low""low""low""low", 'high'"high""high""high""high""high"
Default: 'low'"low""low""low""low""low" (enhanced: 'low'"low""low""low""low""low",
maximum: 'high'"high""high""high""high""high")
-
Data matrix ECC 200, QR Code, Micro QR Code, and Aztec Code:
- 'module_size_min'"module_size_min""module_size_min""module_size_min""module_size_min""module_size_min":
-
Minimum module size in the image in pixels.
- 'module_size_max'"module_size_max""module_size_max""module_size_max""module_size_max""module_size_max":
-
Maximum module size in the image in pixels.
With the following parameters it is possible to specify whether
neighboring foreground modules are connected or whether there is
or may be a gap between them (possible values are 'no'"no""no""no""no""no"
(no gap) < 'small'"small""small""small""small""small" < 'big'"big""big""big""big""big"):
- 'module_gap_col_min'"module_gap_col_min""module_gap_col_min""module_gap_col_min""module_gap_col_min""module_gap_col_min":
-
Minimum gap in direction of the symbol columns.
- 'module_gap_col_max'"module_gap_col_max""module_gap_col_max""module_gap_col_max""module_gap_col_max""module_gap_col_max":
-
Maximum gap in direction of the symbol columns.
- 'module_gap_row_min'"module_gap_row_min""module_gap_row_min""module_gap_row_min""module_gap_row_min""module_gap_row_min":
-
Minimum gap in direction of the symbol rows.
- 'module_gap_row_max'"module_gap_row_max""module_gap_row_max""module_gap_row_max""module_gap_row_max""module_gap_row_max":
-
Maximum gap in direction of the symbol rows.
-
PDF417:
- 'module_width_min'"module_width_min""module_width_min""module_width_min""module_width_min""module_width_min":
-
Minimum module width in the image in pixels.
- 'module_width_max'"module_width_max""module_width_max""module_width_max""module_width_max""module_width_max":
-
Maximum module width in the image in pixels.
- 'module_aspect_min'"module_aspect_min""module_aspect_min""module_aspect_min""module_aspect_min""module_aspect_min":
-
Minimum module aspect ratio (module height to module width).
- 'module_aspect_max'"module_aspect_max""module_aspect_max""module_aspect_max""module_aspect_max""module_aspect_max":
-
Maximum module aspect ratio (module height to module width).
-
Aztec Code:
- 'finder_pattern_tolerance'"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_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d. In one case ('low'"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""high") it is assumed that at least one of the
rings of the finder pattern can be extracted.
- 'additional_levels'"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. [0..2]
-
Data matrix ECC 200:
- 'slant_max'"slant_max""slant_max""slant_max""slant_max""slant_max":
-
Maximum slant of the L-shaped finder pattern (the angle is returned
in radians and corresponds to the distortion that occurs when the
symbol is printed or during the image acquisition).
- 'finder_pattern_tolerance'"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. Depending on this parameter, different
algorithms are used during the symbol search in
find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d. In one case ('low'"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""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_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam because otherwise the
runtime of find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d may increase
significantly.
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""finder_pattern_tolerance" even if the finder
pattern of the symbol is not disturbed. For example, if
'high'"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""finder_pattern_tolerance"
is set to 'any'"any""any""any""any""any" both algorithms are applied.
- 'module_grid'"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 the parameter
different algorithms are used for the calculation of the
module's center positions. If it is set to
'fixed'"fixed""fixed""fixed""fixed""fixed", an equidistant grid is used. Allowing a
variable module size ('variable'"variable""variable""variable""variable""variable"), the grid is
aligned only to the alternating side of the finder pattern.
With 'any'"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""module_grid" is ignored if
'finder_pattern_tolerance'"finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance""finder_pattern_tolerance" is set to
'high'"high""high""high""high""high". In this case, an equidistant grid is
assumed.
- 'contrast_tolerance'"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""contrast_tolerance" is set to 'high'"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""contrast_tolerance" is set to 'low'"low""low""low""low""low" the
algorithm 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""low" should be used in most cases. If
'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance" is set to 'any'"any""any""any""any""any" both
algorithms are applied.
-
QR Code:
- 'position_pattern_min'"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 (2 or 3).
General model behavior:
It is possible to query the values of several or all parameters
with a single operator call by passing a tuple containing the names
of all desired parameters to GenParamNamesGenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames.
As a result a tuple of the same length with the corresponding values
is returned in GenParamValuesGenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Handle of the 2D data code model.
Names of the generic parameters that
are to be queried for the 2D data code model.
Default value:
'contrast_min'
"contrast_min"
"contrast_min"
"contrast_min"
"contrast_min"
"contrast_min"
List of values: 'additional_levels'"additional_levels""additional_levels""additional_levels""additional_levels""additional_levels", 'contrast_min'"contrast_min""contrast_min""contrast_min""contrast_min""contrast_min", 'contrast_tolerance'"contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance""contrast_tolerance", '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", 'mirrored'"mirrored""mirrored""mirrored""mirrored""mirrored", 'model_type'"model_type""model_type""model_type""model_type""model_type", '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_col_max'"module_gap_col_max""module_gap_col_max""module_gap_col_max""module_gap_col_max""module_gap_col_max", 'module_gap_col_min'"module_gap_col_min""module_gap_col_min""module_gap_col_min""module_gap_col_min""module_gap_col_min", 'module_gap_row_max'"module_gap_row_max""module_gap_row_max""module_gap_row_max""module_gap_row_max""module_gap_row_max", 'module_gap_row_min'"module_gap_row_min""module_gap_row_min""module_gap_row_min""module_gap_row_min""module_gap_row_min", 'module_grid'"module_grid""module_grid""module_grid""module_grid""module_grid", '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_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", '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", '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_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_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", 'version_max'"version_max""version_max""version_max""version_max""version_max", 'version_min'"version_min""version_min""version_min""version_min""version_min"
Values of the generic parameters.
The operator get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParam returns the value 2 (H_MSG_TRUE)
if the given parameters are correct.
Otherwise, an exception is raised.
query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParams,
set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam,
find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d
find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d,
write_data_code_2d_modelwrite_data_code_2d_modelWriteDataCode2dModelwrite_data_code_2d_modelWriteDataCode2dModelWriteDataCode2dModel
write_data_code_2d_modelwrite_data_code_2d_modelWriteDataCode2dModelwrite_data_code_2d_modelWriteDataCode2dModelWriteDataCode2dModel
query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParams,
set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam,
get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResults,
get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjects,
find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d
Data Code