ClassesClassesClassesClasses | | | | Operators

get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjects (Operator)

Name

get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjects — Access iconic objects that were created during the search for 2D data code symbols.

Signature

get_data_code_2d_objects( : DataCodeObjects : DataCodeHandle, CandidateHandle, ObjectName : )

Herror get_data_code_2d_objects(Hobject* DataCodeObjects, const Hlong DataCodeHandle, const Hlong CandidateHandle, const char* ObjectName)

Herror T_get_data_code_2d_objects(Hobject* DataCodeObjects, const Htuple DataCodeHandle, const Htuple CandidateHandle, const Htuple ObjectName)

Herror get_data_code_2d_objects(Hobject* DataCodeObjects, const HTuple& DataCodeHandle, const HTuple& CandidateHandle, const HTuple& ObjectName)

void GetDataCode2dObjects(HObject* DataCodeObjects, const HTuple& DataCodeHandle, const HTuple& CandidateHandle, const HTuple& ObjectName)

HObject HDataCode2D::GetDataCode2dObjects(const HTuple& CandidateHandle, const HString& ObjectName) const

HObject HDataCode2D::GetDataCode2dObjects(Hlong CandidateHandle, const HString& ObjectName) const

HObject HDataCode2D::GetDataCode2dObjects(Hlong CandidateHandle, const char* ObjectName) const

void HOperatorSetX.GetDataCode2dObjects(
[out] IHUntypedObjectX*DataCodeObjects, [in] VARIANT DataCodeHandle, [in] VARIANT CandidateHandle, [in] VARIANT ObjectName)

IHUntypedObjectX* HDataCode2DX.GetDataCode2dObjects(
[in] VARIANT CandidateHandle, [in] BSTR ObjectName)

static void HOperatorSet.GetDataCode2dObjects(out HObject dataCodeObjects, HTuple dataCodeHandle, HTuple candidateHandle, HTuple objectName)

HObject HDataCode2D.GetDataCode2dObjects(HTuple candidateHandle, string objectName)

HObject HDataCode2D.GetDataCode2dObjects(int candidateHandle, string objectName)

Description

The operator get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjects facilitates to access iconic objects that were created during the last call of find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d while searching and reading the 2D data code symbols. Besides the name of the object (ObjectNameObjectNameObjectNameObjectNameObjectNameobjectName), the 2D data code model (DataCodeHandleDataCodeHandleDataCodeHandleDataCodeHandleDataCodeHandledataCodeHandle) must be passed to get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjects. In addition, in CandidateHandleCandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle a handle of a result or candidate structure or a string identifying a group of candidates (see get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResults) must be passed. These handles are returned by find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d for all successfully decoded symbols and by get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResults for a group of candidates. If these operators return several handles in a tuple, the individual handles can be accessed by normal tuple operations.

If 'discard_undecoded_candidates'"discard_undecoded_candidates""discard_undecoded_candidates""discard_undecoded_candidates""discard_undecoded_candidates""discard_undecoded_candidates" was set to 'yes'"yes""yes""yes""yes""yes" with set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam, only results of successfully decoded candidates can be accessed.

Some objects are not accessible without setting the model parameter 'persistence'"persistence""persistence""persistence""persistence""persistence" to 1 (see set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam). The persistence must be set before calling find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d, either while creating the model with create_data_code_2d_modelcreate_data_code_2d_modelCreateDataCode2dModelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModel or with set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam.

Currently, the following iconic objects can be retrieved:

Regions of the modules

'module_1_rois'"module_1_rois""module_1_rois""module_1_rois""module_1_rois""module_1_rois":

All modules that were classified as foreground (set).

'module_0_rois'"module_0_rois""module_0_rois""module_0_rois""module_0_rois""module_0_rois":

All modules that were classified as background (not set).

These region arrays correspond to the areas that were used for the classification. The returned object is a region array. Hence it cannot be requested for a group of candidates. Therefore, a single result handle must be passed in CandidateHandleCandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle. The model persistence must be 1 for this object. In addition, requesting the module ROIs makes sense only for symbols that were detected as valid symbols. For other candidates, whose processing was aborted earlier, the module ROIs are not available.

XLD contour

'candidate_xld'"candidate_xld""candidate_xld""candidate_xld""candidate_xld""candidate_xld":

An XLD contour that surrounds the candidate or decoded symbol.

This object can be requested for any group of results or for any single candidate or symbol handle. The persistence setting is of no relevance.

Pyramid images

'search_image'"search_image""search_image""search_image""search_image""search_image":

Pyramid image, in which the candidate was found.

'process_image'"process_image""process_image""process_image""process_image""process_image":

Pyramid image, in which the candidate was investigated more closely.

The persistence setting is also not relevant here.

Parallelization

Parameters

DataCodeObjectsDataCodeObjectsDataCodeObjectsDataCodeObjectsDataCodeObjectsdataCodeObjects (output_object)  object(-array) objectHObjectHObjectHObjectHObjectXHobject *

Objects that are created as intermediate results during the detection or evaluation of 2D data codes.

DataCodeHandleDataCodeHandleDataCodeHandleDataCodeHandleDataCodeHandledataCodeHandle (input_control)  datacode_2d HDataCode2D, HTupleHTupleHDataCode2D, HTupleHDataCode2DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the 2D data code model.

CandidateHandleCandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandle (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*) (Hlong / BSTR) (Hlong / char*)

Handle of the 2D data code candidate or name of a group of candidates for which the iconic data is requested.

Default value: 'all_candidates' "all_candidates" "all_candidates" "all_candidates" "all_candidates" "all_candidates"

Suggested values: 0, 1, 2, 'all_candidates'"all_candidates""all_candidates""all_candidates""all_candidates""all_candidates", 'all_results'"all_results""all_results""all_results""all_results""all_results", 'all_undecoded'"all_undecoded""all_undecoded""all_undecoded""all_undecoded""all_undecoded", 'all_aborted'"all_aborted""all_aborted""all_aborted""all_aborted""all_aborted"

ObjectNameObjectNameObjectNameObjectNameObjectNameobjectName (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Name of the iconic object to return.

Default value: 'candidate_xld' "candidate_xld" "candidate_xld" "candidate_xld" "candidate_xld" "candidate_xld"

List of values: 'candidate_xld'"candidate_xld""candidate_xld""candidate_xld""candidate_xld""candidate_xld", 'module_0_rois'"module_0_rois""module_0_rois""module_0_rois""module_0_rois""module_0_rois", 'module_1_rois'"module_1_rois""module_1_rois""module_1_rois""module_1_rois""module_1_rois", 'process_image'"process_image""process_image""process_image""process_image""process_image", 'search_image'"search_image""search_image""search_image""search_image""search_image"

Example (HDevelop)

* Example demonstrating how to access the iconic objects of the data code
* search.

* Create a model for reading Data matrix ECC 200 codes
create_data_code_2d_model ('Data Matrix ECC 200', [], [], DataCodeHandle)
* 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)

* Get the handles of all candidates that were detected as a symbol but
* could not be read
get_data_code_2d_results (DataCodeHandle, 'all_undecoded', 'handle', \
                          HandlesUndecoded)

* For every undecoded symbol, get the contour and the classified
* module regions
for i := 0 to |HandlesUndecoded| - 1 by 1
    * Get the contour of the symbol
    dev_set_color ('blue')
    get_data_code_2d_objects (SymbolXLD, DataCodeHandle, \
                              HandlesUndecoded[i], 'candidate_xld')
    * Get the module regions of the foreground modules
    dev_set_color ('green')
    get_data_code_2d_objects (ModuleFG, DataCodeHandle, \
                              HandlesUndecoded[i], 'module_1_rois')
    * Get the module regions of the background modules
    dev_set_color ('red')
    get_data_code_2d_objects (ModuleBG, DataCodeHandle, \
                              HandlesUndecoded[i], 'module_0_rois')
    * Stop for inspecting the image
    stop ()
endfor

* Clear the model
clear_data_code_2d_model (DataCodeHandle)

Result

The operator get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjects 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 is raised.

Possible Predecessors

find_data_code_2dfind_data_code_2dFindDataCode2dfind_data_code_2dFindDataCode2dFindDataCode2d, query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParams

Possible Successors

get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResults

See also

query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParams, get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResults, get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParam, set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParam

Module

Data Code


ClassesClassesClassesClasses | | | | Operators