HALCON Reference Manual 10.0.2
Table of Contents / Legacy / 2D Bar Code ClassesClassesClasses | | | Operators

find_2d_bar_codeT_find_2d_bar_codefind_2d_bar_codeFind2dBarCodeFind2dBarCode (Operator)

Name

find_2d_bar_codeT_find_2d_bar_codefind_2d_bar_codeFind2dBarCodeFind2dBarCode — Find regions that might contain a 2D bar code.

Warning

find_2d_bar_codefind_2d_bar_codefind_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_modelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModel).

Signature

find_2d_bar_code(Image : CodeRegion : BarCodeDescr, GenParamNames, GenParamValues : CodeRegDescr)

Herror T_find_2d_bar_code(const Hobject Image, Hobject* CodeRegion, const Htuple BarCodeDescr, const Htuple GenParamNames, const Htuple GenParamValues, Htuple* CodeRegDescr)

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 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)

Description

find_2d_bar_codefind_2d_bar_codefind_2d_bar_codeFind2dBarCodeFind2dBarCode searches in the image ImageImageImageImageimage for regions that might contain a 2D bar code. Candidate regions are returned in the array of regions CodeRegionCodeRegionCodeRegionCodeRegioncodeRegion. 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_codeget_2d_bar_codeGet2dBarCodeGet2dBarCode (or get_2d_bar_code_posget_2d_bar_code_posget_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_codeget_2d_bar_codeGet2dBarCodeGet2dBarCode or get_2d_bar_code_posget_2d_bar_code_posget_2d_bar_code_posGet2dBarCodePosGet2dBarCodePos). This information is stored in a region descriptor and returned in the parameter CodeRegDescrCodeRegDescrCodeRegDescrCodeRegDescrcodeRegDescr.

Depending on the method for printing the bar code ('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_descrgen_2d_bar_code_descrGen2dBarCodeDescrGen2dBarCodeDescr and passed in the parameter BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr.

In the case of difficult conditions, additional control parameters can be passed to the operator with the help of the (optional) generic parameters GenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames and GenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues, 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.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte)

Image of one or more bar codes.

CodeRegionCodeRegionCodeRegionCodeRegioncodeRegion (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Regions that might contain a bar code.

BarCodeDescrBarCodeDescrBarCodeDescrBarCodeDescrbarCodeDescr (input_control)  barcode_2d-array HTupleHBarCode2D, HTupleHBarCode2DX, VARIANTHtuple (string / integer / real) (string / int / long / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Description of a 2D bar code class to look for.

GenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames (input_control)  attribute.name(-array) HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

List of names of (optional) generic parameters controlling the image processing.

Default value: []

List of values: 'module_width'"module_width""module_width""module_width""module_width", 'anisometry_max'"anisometry_max""anisometry_max""anisometry_max""anisometry_max", 'compactness_min'"compactness_min""compactness_min""compactness_min""compactness_min", 'compactness_max'"compactness_max""compactness_max""compactness_max""compactness_max", 'circularity_min'"circularity_min""circularity_min""circularity_min""circularity_min", 'circularity_max'"circularity_max""circularity_max""circularity_max""circularity_max", 'deviation_min'"deviation_min""deviation_min""deviation_min""deviation_min", '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_2'"mean_mask_size_2""mean_mask_size_2""mean_mask_size_2""mean_mask_size_2", 'area_min'"area_min""area_min""area_min""area_min", 'area_max'"area_max""area_max""area_max""area_max", 'closing_mask_rad'"closing_mask_rad""closing_mask_rad""closing_mask_rad""closing_mask_rad", 'opening_mask_rad'"opening_mask_rad""opening_mask_rad""opening_mask_rad""opening_mask_rad", 'compactness_min'"compactness_min""compactness_min""compactness_min""compactness_min", 'compactness_max'"compactness_max""compactness_max""compactness_max""compactness_max", 'edge_thresh'"edge_thresh""edge_thresh""edge_thresh""edge_thresh", 'region_rect2_rel'"region_rect2_rel""region_rect2_rel""region_rect2_rel""region_rect2_rel", 'median_mask_rad'"median_mask_rad""median_mask_rad""median_mask_rad""median_mask_rad"

GenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues (input_control)  attribute.value(-array) HTupleHTupleVARIANTHtuple (real / integer / string) (double / int / long / string) (double / Hlong / char*) (double / Hlong / BSTR) (double / Hlong / char*)

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

CodeRegDescrCodeRegDescrCodeRegDescrCodeRegDescrcodeRegDescr (output_control)  string-array HTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Additional parameters describing the bar code regions. They can be used for extracting the data (see decode_2d_bar_codedecode_2d_bar_codedecode_2d_bar_codeDecode2dBarCodeDecode2dBarCode).

Result

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

Possible Predecessors

gen_2d_bar_code_descrgen_2d_bar_code_descrgen_2d_bar_code_descrGen2dBarCodeDescrGen2dBarCodeDescr

Possible Successors

get_2d_bar_codeget_2d_bar_codeget_2d_bar_codeGet2dBarCodeGet2dBarCode, get_2d_bar_code_posget_2d_bar_code_posget_2d_bar_code_posGet2dBarCodePosGet2dBarCodePos

Module

Data Code


Table of Contents / Legacy / 2D Bar Code ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH