HALCON Reference Manual 10.0.2
Table of Contents / Identification / Bar Code ClassesClassesClasses | | | Operators

get_bar_code_objectget_bar_code_objectget_bar_code_objectGetBarCodeObjectGetBarCodeObject (Operator)

Name

get_bar_code_objectget_bar_code_objectget_bar_code_objectGetBarCodeObjectGetBarCodeObject — Access iconic objects that were created during the search or decoding of bar code symbols.

Signature

get_bar_code_object( : BarCodeObjects : BarCodeHandle, CandidateHandle, ObjectName : )

Herror get_bar_code_object(Hobject* BarCodeObjects, const Hlong BarCodeHandle, const char* CandidateHandle, const char* ObjectName)

Herror T_get_bar_code_object(Hobject* BarCodeObjects, const Htuple BarCodeHandle, const Htuple CandidateHandle, const Htuple ObjectName)

Herror get_bar_code_object(Hobject* BarCodeObjects, const HTuple& BarCodeHandle, const HTuple& CandidateHandle, const HTuple& ObjectName)

void HOperatorSetX.GetBarCodeObject(
[out] IHUntypedObjectX*BarCodeObjects, [in] VARIANT BarCodeHandle, [in] VARIANT CandidateHandle, [in] VARIANT ObjectName)

IHUntypedObjectX* HBarCodeX.GetBarCodeObject(
[in] VARIANT CandidateHandle, [in] BSTR ObjectName)

static void HOperatorSet.GetBarCodeObject(out HObject barCodeObjects, HTuple barCodeHandle, HTuple candidateHandle, HTuple objectName)

HObject HBarCode.GetBarCodeObject(HTuple candidateHandle, string objectName)

HObject HBarCode.GetBarCodeObject(string candidateHandle, string objectName)

Description

With the operator get_bar_code_objectget_bar_code_objectget_bar_code_objectGetBarCodeObjectGetBarCodeObject, iconic objects created during the last call of the operator find_bar_codefind_bar_codefind_bar_codeFindBarCodeFindBarCode can be accessed. Besides the name of the object (ObjectNameObjectNameObjectNameObjectNameobjectName), the bar code model (BarCodeHandleBarCodeHandleBarCodeHandleBarCodeHandlebarCodeHandle) must be passed to get_bar_code_objectget_bar_code_objectget_bar_code_objectGetBarCodeObjectGetBarCodeObject. In addition, in CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle an index to a single decoded symbol or a single symbol candidate must be passed. Alternatively, CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle can be set to 'all'"all""all""all""all" and then all objects of the decoded symbols or symbol candidates are returned.

Depending on the option selected in ObjectNameObjectNameObjectNameObjectNameobjectName parameter the following objects are returned:

'symbol_regions'"symbol_regions""symbol_regions""symbol_regions""symbol_regions":

The regions of successfully decoded symbols are returned. When choosing 'all'"all""all""all""all" as CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle, the regions of all decoded symbols are retrieved. The order of the returned objects is the same as in find_bar_codefind_bar_codefind_bar_codeFindBarCodeFindBarCode. If there is a total of n decoded symbols CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle can be chosen in between 0 and (n-1) to get the region of the respective decoded symbol.

'candidate_regions'"candidate_regions""candidate_regions""candidate_regions""candidate_regions":

The regions of potential bar codes are returned. If there is a total of n decoded symbols out of a total of m candidates then CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle can be chosen between 0 and (m-1). With CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle between 0 and (n-1) the original segmented region of the respective decoded symbol is retrieved. With CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle between n and (m-1) the region of the potential or undecodable symbol is returned. In addition, CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle can be set to 'all'"all""all""all""all" to retrieve all candidate regions at the same time.

'scanlines_all'"scanlines_all""scanlines_all""scanlines_all""scanlines_all", 'scanlines_valid'"scanlines_valid""scanlines_valid""scanlines_valid""scanlines_valid":

The XLD contours representing the particular detected bars in the scanlines applied on the candidate regions are returned. Note that the scanlines can be fetched only if the bar code was decoded by find_bar_codefind_bar_codefind_bar_codeFindBarCodeFindBarCode or decode_bar_code_rectangle2decode_bar_code_rectangle2decode_bar_code_rectangle2DecodeBarCodeRectangle2DecodeBarCodeRectangle2 in 'persistence'"persistence""persistence""persistence""persistence" mode (see set_bar_code_paramset_bar_code_paramset_bar_code_paramSetBarCodeParamSetBarCodeParam for further details). 'scanlines_all'"scanlines_all""scanlines_all""scanlines_all""scanlines_all" represents all scanlines that find_bar_codefind_bar_codefind_bar_codeFindBarCodeFindBarCode would place in order to decode a bar code. 'scanlines_valid'"scanlines_valid""scanlines_valid""scanlines_valid""scanlines_valid" represents only those scanlines that could be successfully decoded. For single row bar codes, there will be at least one 'scanlines_valid'"scanlines_valid""scanlines_valid""scanlines_valid""scanlines_valid" if the symbol was successfully decoded. The default number of scanlines that has to be valid can be adjusted with set_bar_code_paramset_bar_code_paramset_bar_code_paramSetBarCodeParamSetBarCodeParam with the parameter 'min_identical_scanlines'"min_identical_scanlines""min_identical_scanlines""min_identical_scanlines""min_identical_scanlines". There will be no 'scanlines_valid'"scanlines_valid""scanlines_valid""scanlines_valid""scanlines_valid" if the symbol was not decoded. For stacked bar codes (e.g. 'RSS-14 Stacked'"RSS-14 Stacked""RSS-14 Stacked""RSS-14 Stacked""RSS-14 Stacked" and 'RSS Expanded Stacked'"RSS Expanded Stacked""RSS Expanded Stacked""RSS Expanded Stacked""RSS Expanded Stacked") this rule applies similarly, but on a per-symbol-row basis rather then per-symbol. get_bar_code_objectget_bar_code_objectget_bar_code_objectGetBarCodeObjectGetBarCodeObject returns each scanline as separate XLD contour. If 'all'"all""all""all""all" is used as CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle, all scanlines in all candidate regions will be returned. If only scanlines of a certain candidate region should be returned, the candidate number must be specified in CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle. Please note that the XLD contours are meant for visualization purposes and hence consist of many XLD points. Double lines are used between edges that the bar code reader recognized as bar, whereas single lines are used for white spaces. Additional information about each scanline can be obtained with get_bar_code_resultget_bar_code_resultget_bar_code_resultGetBarCodeResultGetBarCodeResult with the parameter 'status'"status""status""status""status".

Attention

A bar code model 'BarCodeHandle'"BarCodeHandle""BarCodeHandle""BarCodeHandle""BarCodeHandle" cannot be shared between two or more user's threads. Different bar code models can be used independently and safely in different threads.

Parallelization

Parameters

BarCodeObjectsBarCodeObjectsBarCodeObjectsBarCodeObjectsbarCodeObjects (output_object)  object(-array) objectHObjectHObjectHObjectXHobject *

Objects that are created as intermediate results during the detection or evaluation of bar codes.

BarCodeHandleBarCodeHandleBarCodeHandleBarCodeHandlebarCodeHandle (input_control)  barcode HBarCode, HTupleHBarCode, HTupleHBarCodeX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Handle of the bar code model.

CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle (input_control)  integer HTupleHTupleVARIANTHtuple (string / integer) (string / int / long) (char* / Hlong) (BSTR / Hlong) (char* / Hlong)

Indicating the bar code results respectively candidates for which the data is required.

Default value: 'all' "all" "all" "all" "all"

Suggested values: 0, 1, 2, 'all'"all""all""all""all"

ObjectNameObjectNameObjectNameObjectNameobjectName (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Name of the iconic object to return.

Default value: 'symbol_regions' "symbol_regions" "symbol_regions" "symbol_regions" "symbol_regions"

List of values: 'symbol_regions'"symbol_regions""symbol_regions""symbol_regions""symbol_regions", 'candidate_regions'"candidate_regions""candidate_regions""candidate_regions""candidate_regions", 'scanlines_all'"scanlines_all""scanlines_all""scanlines_all""scanlines_all", 'scanlines_valid'"scanlines_valid""scanlines_valid""scanlines_valid""scanlines_valid"

Result

The operator get_bar_code_objectget_bar_code_objectget_bar_code_objectGetBarCodeObjectGetBarCodeObject returns the value 2 (H_MSG_TRUE) if the given parameters are correct and the requested objects are available for the last symbol search. Otherwise, an exception will be raised.

Possible Predecessors

find_bar_codefind_bar_codefind_bar_codeFindBarCodeFindBarCode

See also

get_bar_code_resultget_bar_code_resultget_bar_code_resultGetBarCodeResultGetBarCodeResult

Module

Bar Code


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