Name
find_2d_bar_codeT_find_2d_bar_codeFind2dBarCodefind_2d_bar_codeFind2dBarCodeFind2dBarCode — Find regions that might contain a 2D bar code.
Warning
find_2d_bar_codefind_2d_bar_codeFind2dBarCodefind_2d_bar_codeFind2dBarCodeFind2dBarCode is obsolete and is only provided for
reasons of backward compatibility. New applications should use the
functionality in the chapter Identification / Data Code for reading 2D data
code symbologies instead (see create_data_code_2d_modelcreate_data_code_2d_modelCreateDataCode2dModelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModel).
Herror find_2d_bar_code(Hobject Image, Hobject* CodeRegion, const HTuple& BarCodeDescr, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* CodeRegDescr)
HRegionArray HImage::Find2dBarCode(const HTuple& BarCodeDescr, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* CodeRegDescr) const
HRegionArray HBarCode2D::Find2dBarCode(const HImage& Image, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* CodeRegDescr) const
void Find2dBarCode(const HObject& Image, HObject* CodeRegion, const HTuple& BarCodeDescr, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* CodeRegDescr)
HRegion HImage::Find2dBarCode(const HTuple& BarCodeDescr, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* CodeRegDescr) const
HRegion HImage::Find2dBarCode(const HTuple& BarCodeDescr, const HString& GenParamNames, double GenParamValues, HTuple* CodeRegDescr) const
HRegion HImage::Find2dBarCode(const HTuple& BarCodeDescr, const char* GenParamNames, double GenParamValues, HTuple* CodeRegDescr) const
void HOperatorSetX.Find2dBarCode(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX** CodeRegion, [in] VARIANT BarCodeDescr, [in] VARIANT GenParamNames, [in] VARIANT GenParamValues, [out] VARIANT* CodeRegDescr)
IHRegionX* HBarCode2DX.Find2dBarCode(
[in] IHImageX* Image, [in] VARIANT BarCodeDescr, [in] VARIANT GenParamNames, [in] VARIANT GenParamValues, [out] VARIANT* CodeRegDescr)
IHRegionX* HImageX.Find2dBarCode(
[in] VARIANT BarCodeDescr, [in] VARIANT GenParamNames, [in] VARIANT GenParamValues, [out] VARIANT* CodeRegDescr)
static void HOperatorSet.Find2dBarCode(HObject image, out HObject codeRegion, HTuple barCodeDescr, HTuple genParamNames, HTuple genParamValues, out HTuple codeRegDescr)
HRegion HImage.Find2dBarCode(HTuple barCodeDescr, HTuple genParamNames, HTuple genParamValues, out HTuple codeRegDescr)
HRegion HImage.Find2dBarCode(HTuple barCodeDescr, string genParamNames, double genParamValues, out HTuple codeRegDescr)
find_2d_bar_codefind_2d_bar_codeFind2dBarCodefind_2d_bar_codeFind2dBarCodeFind2dBarCode searches in the image ImageImageImageImageImageimage for regions
that might contain a 2D bar code. Candidate regions are returned in the
array of regions CodeRegionCodeRegionCodeRegionCodeRegionCodeRegioncodeRegion. Whether such a region really contains
a (readable) 2D bar code can only be determined with the help of the
operator get_2d_bar_codeget_2d_bar_codeGet2dBarCodeget_2d_bar_codeGet2dBarCodeGet2dBarCode (or get_2d_bar_code_posget_2d_bar_code_posGet2dBarCodePosget_2d_bar_code_posGet2dBarCodePosGet2dBarCodePos).
Besides regions that might contain a 2D bar code, the operator passes
further, internal information about the regions to the operator for
extracting the data from a symbol (get_2d_bar_codeget_2d_bar_codeGet2dBarCodeget_2d_bar_codeGet2dBarCodeGet2dBarCode or
get_2d_bar_code_posget_2d_bar_code_posGet2dBarCodePosget_2d_bar_code_posGet2dBarCodePosGet2dBarCodePos). This information is stored in a region
descriptor and returned in the parameter CodeRegDescrCodeRegDescrCodeRegDescrCodeRegDescrCodeRegDescrcodeRegDescr.
Depending on the method for printing the bar code ('mode'"mode""mode""mode""mode""mode"),
different image processing steps are performed. Together with other
information about the 2D bar code, the actual printing method is part of a
descriptor created with the help of the operator
gen_2d_bar_code_descrgen_2d_bar_code_descrGen2dBarCodeDescrgen_2d_bar_code_descrGen2dBarCodeDescrGen2dBarCodeDescr and passed in the parameter
BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr.
In the case of difficult conditions, additional control parameters can
be passed to the operator with the help of the (optional) generic
parameters GenParamNamesGenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames and GenParamValuesGenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues, in the
form of descriptor-value pairs. One group of parameters describes the
appearance of the symbols in the actual images, e.g., the expected size
of data elements in pixels. The operator will then check candidate regions
against the specified criteria. Suitable values can be determined from the
real images, e.g., by manually selecting a region with a bar code and then
applying the corresponding operator. If the specification of such
parameters does not lead to successfully extracted regions, the user can
influence the underlying image processing operators directly with the help
of a second group of parameters. As the image processing steps taken depend
on the printing method, different parameters are to be applied.
-
Parameter that will be passed on in CodeRegDescrCodeRegDescrCodeRegDescrCodeRegDescrCodeRegDescrcodeRegDescr:
- 'module_width'
-
Mean size of a module (data element) in pixels.
From this quantity, a set of other parameters will be derived.
A module should have a size of 4 to 16 pixels in
order to be recognized successfully.
GenParamValues: > 0
default: 10
-
Parameters for the printing method 'printed'"printed""printed""printed""printed""printed":
The following parameters are used to limit the set of candidate regions
with the help of region features. To prevent the use of a certain feature,
the corresponding parameter must be set to -1.
- 'anisometry_max'
-
Maximum anisometry (see operator eccentricityeccentricityEccentricityeccentricityEccentricityEccentricity).
GenParamValues: > 1 (-1: feature not used)
default: 1.45
- 'compactness_min'
-
Minimum compactness (see operator compactnesscompactnessCompactnesscompactnessCompactnessCompactness).
GenParamValues: > 1 (-1: feature not used)
default: 1.2
- 'compactness_max'
-
Maximum compactness.
GenParamValues: >= 'compactness_min'"compactness_min""compactness_min""compactness_min""compactness_min""compactness_min" (-1: feature not used)
default: 3.0
- 'circularity_max'
-
Maximum circularity (see operator circularitycircularityCircularitycircularityCircularityCircularity).
GenParamValues: 0...1 (-1: feature not used)
default: 0.8
- 'circularity_min'
-
Minimum circularity.
GenParamValues: <= 'circularity_max'"circularity_max""circularity_max""circularity_max""circularity_max""circularity_max" (-1: feature not used)
default: 0.45
- 'deviation_min'
-
Minimum deviation of gray values (see operator intensityintensityIntensityintensityIntensityIntensity).
GenParamValues: > 1.0
default: 20.0
The following parameters are automatically derived from the size of a module,
'module_width'"module_width""module_width""module_width""module_width""module_width", and from parameters of the bar code descriptor
BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr (see operator gen_2d_bar_code_descrgen_2d_bar_code_descrGen2dBarCodeDescrgen_2d_bar_code_descrGen2dBarCodeDescrGen2dBarCodeDescr). However,
they can be adjusted individually, too.
ATTENTION: If you want to set 'module_width'"module_width""module_width""module_width""module_width""module_width" together with
other parameters, make sure set 'module_width'"module_width""module_width""module_width""module_width""module_width" BEFORE the others!
- 'mean_mask_size_1'
-
Mask size for the first smoothing of the image.
GenParamValues: >= 3
default: 2.5*'module_width'"module_width""module_width""module_width""module_width""module_width"
- 'mean_mask_size_2'
-
Mask size for the second smoothing of the image.
GenParamValues: >= 5
default: 10.0*'module_width'"module_width""module_width""module_width""module_width""module_width"
- 'area_min'
-
Minimum size of the symbol in pixels squared.
GenParamValues: > 0
default: 0.25 * 'module_width'"module_width""module_width""module_width""module_width""module_width"^2 * 'columns_min'"columns_min""columns_min""columns_min""columns_min""columns_min" * 'rows_min'"rows_min""rows_min""rows_min""rows_min""rows_min"
- 'area_max'
-
Maximum size of the symbol in pixels squared.
GenParamValues: >= 'area_min'"area_min""area_min""area_min""area_min""area_min"
default: 4.00 * 'module_width'"module_width""module_width""module_width""module_width""module_width"^2 * 'columns_min'"columns_min""columns_min""columns_min""columns_min""columns_min" * 'rows_min'"rows_min""rows_min""rows_min""rows_min""rows_min"
- 'closing_mask_rad'
-
Mask size for calling the operator closing_circleclosing_circleClosingCircleclosing_circleClosingCircleClosingCircle with a test region..
GenParamValues: > 0
default: 'module_width'"module_width""module_width""module_width""module_width""module_width"
-
Parameters for the printing method 'engraved_darkfield'"engraved_darkfield""engraved_darkfield""engraved_darkfield""engraved_darkfield""engraved_darkfield":
- 'compactness_min'
-
Minimum compactness (see operator compactnesscompactnessCompactnesscompactnessCompactnessCompactness).
GenParamValues: > 1.0 (-1: feature not used)
default: 1.2
- 'compactness_max'
-
GenParamValues: >= 'compactness_min'"compactness_min""compactness_min""compactness_min""compactness_min""compactness_min" (-1: feature not used)
default: 3.0
- 'edge_thresh'
-
Maximum compactness.
GenParamValues: 0...255
default: 120
- 'region_rect2_rel'
-
Relation between the areas of the region and the smallest surrounding rectangle.
GenParamValues: < 1.0
default: 0.7
- 'median_mask_rad'
-
Mask size for the initial median filtering (see operator median_imagemedian_imageMedianImagemedian_imageMedianImageMedianImage).
GenParamValues: > 0
default: 0.1 * 'module_width'"module_width""module_width""module_width""module_width""module_width" + 0.5
-
Parameters for the printing method 'engraved_lightfield'"engraved_lightfield""engraved_lightfield""engraved_lightfield""engraved_lightfield""engraved_lightfield":
- 'anisometry_max'
-
Maximum anisometry (see operator eccentricityeccentricityEccentricityeccentricityEccentricityEccentricity).
GenParamValues: > 1 (-1: feature not used)
default: 1.45
- 'compactness_min'
-
Minimum compactness (see operator compactnesscompactnessCompactnesscompactnessCompactnessCompactness).
GenParamValues: > 1 (-1: feature not used)
default: 1.2
- 'compactness_max'
-
Maximum compactness.
GenParamValues: >= 'compactness_min'"compactness_min""compactness_min""compactness_min""compactness_min""compactness_min" (-1: feature not used)
default: 3.0
- 'circularity_max'
-
Maximum circularity (see operator circularitycircularityCircularitycircularityCircularityCircularity).
GenParamValues: 0...1 (-1: feature not used)
default: 0.8
- 'circularity_min'
-
Minimum circularity.
GenParamValues: <= 'circularity_max'"circularity_max""circularity_max""circularity_max""circularity_max""circularity_max" (-1: feature not used)
default: 0.45
- 'deviation_min'
-
Minimum deviation of gray values (see operator intensityintensityIntensityintensityIntensityIntensity).
GenParamValues: > 1.0
default: 20.0
- 'mean_mask_size'
-
Mask size for smoothing the image.
GenParamValues: >= 3
default: 10*'module_width'"module_width""module_width""module_width""module_width""module_width"
- 'area_min'
-
Minimum size of the symbol in pixels squared.
GenParamValues: > 0
default: 0.25 * 'module_width'"module_width""module_width""module_width""module_width""module_width"^2 * 'columns_min'"columns_min""columns_min""columns_min""columns_min""columns_min" * 'rows_min'"rows_min""rows_min""rows_min""rows_min""rows_min"
- 'area_max'
-
Maximum size of the symbol in pixels squared.
GenParamValues: >= 'area_min'"area_min""area_min""area_min""area_min""area_min"
default: 4.00 * 'module_width'"module_width""module_width""module_width""module_width""module_width"^2 * 'columns_min'"columns_min""columns_min""columns_min""columns_min""columns_min" * 'rows_min'"rows_min""rows_min""rows_min""rows_min""rows_min"
- 'closing_mask_rad'
-
Mask size for calling the operator closing_circleclosing_circleClosingCircleclosing_circleClosingCircleClosingCircle with a test region.
GenParamValues: > 0
default: 'module_width'"module_width""module_width""module_width""module_width""module_width"
- 'opening_mask_rad'
-
Mask size for calling the operator opening_circleopening_circleOpeningCircleopening_circleOpeningCircleOpeningCircle with a test region.
GenParamValues: > 0
default: 1.5*'module_width'"module_width""module_width""module_width""module_width""module_width"
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Image of one or more bar codes.
Regions that might contain a bar code.
Description of a 2D bar code class to look for.
List of names of (optional) generic parameters
controlling the image processing.
Default value: []
List of values: 'anisometry_max'"anisometry_max""anisometry_max""anisometry_max""anisometry_max""anisometry_max", 'area_max'"area_max""area_max""area_max""area_max""area_max", 'area_min'"area_min""area_min""area_min""area_min""area_min", 'circularity_max'"circularity_max""circularity_max""circularity_max""circularity_max""circularity_max", 'circularity_min'"circularity_min""circularity_min""circularity_min""circularity_min""circularity_min", 'closing_mask_rad'"closing_mask_rad""closing_mask_rad""closing_mask_rad""closing_mask_rad""closing_mask_rad", 'compactness_max'"compactness_max""compactness_max""compactness_max""compactness_max""compactness_max", 'compactness_max'"compactness_max""compactness_max""compactness_max""compactness_max""compactness_max", 'compactness_min'"compactness_min""compactness_min""compactness_min""compactness_min""compactness_min", 'compactness_min'"compactness_min""compactness_min""compactness_min""compactness_min""compactness_min", 'deviation_min'"deviation_min""deviation_min""deviation_min""deviation_min""deviation_min", 'edge_thresh'"edge_thresh""edge_thresh""edge_thresh""edge_thresh""edge_thresh", 'mean_mask_size'"mean_mask_size""mean_mask_size""mean_mask_size""mean_mask_size""mean_mask_size", 'mean_mask_size_1'"mean_mask_size_1""mean_mask_size_1""mean_mask_size_1""mean_mask_size_1""mean_mask_size_1", 'mean_mask_size_2'"mean_mask_size_2""mean_mask_size_2""mean_mask_size_2""mean_mask_size_2""mean_mask_size_2", 'median_mask_rad'"median_mask_rad""median_mask_rad""median_mask_rad""median_mask_rad""median_mask_rad", 'module_width'"module_width""module_width""module_width""module_width""module_width", 'opening_mask_rad'"opening_mask_rad""opening_mask_rad""opening_mask_rad""opening_mask_rad""opening_mask_rad", 'region_rect2_rel'"region_rect2_rel""region_rect2_rel""region_rect2_rel""region_rect2_rel""region_rect2_rel"
List of values of generic parameters controlling the
image processing.
Default value: []
List of values: 1, 1.1, 1.2, 1.3, 1.4, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
The operator find_2d_bar_codefind_2d_bar_codeFind2dBarCodefind_2d_bar_codeFind2dBarCodeFind2dBarCode returns the value 2 (H_MSG_TRUE)
if the given parameters are correct.
Otherwise, an exception will be raised.
gen_2d_bar_code_descrgen_2d_bar_code_descrGen2dBarCodeDescrgen_2d_bar_code_descrGen2dBarCodeDescrGen2dBarCodeDescr
get_2d_bar_codeget_2d_bar_codeGet2dBarCodeget_2d_bar_codeGet2dBarCodeGet2dBarCode,
get_2d_bar_code_posget_2d_bar_code_posGet2dBarCodePosget_2d_bar_code_posGet2dBarCodePosGet2dBarCodePos
Data Code