get_data_code_2d_objectsT_get_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects (算子)

名称

get_data_code_2d_objectsT_get_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects — 访问在搜索二维数据码符号期间创建的图标对象。

签名

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

Herror T_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

HObject HDataCode2D::GetDataCode2dObjects(Hlong CandidateHandle, const wchar_t* ObjectName) const   ( Windows only)

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)

def get_data_code_2d_objects(data_code_handle: HHandle, candidate_handle: Union[int, str], object_name: str) -> HObject

描述

算子 get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects facilitates to access iconic objects that were created during the last call of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dFindDataCode2dfind_data_code_2d while searching and reading the 2D data code symbols. Besides the name of the object (ObjectNameObjectNameObjectNameObjectNameobjectNameobject_name), the 2D data code model (DataCodeHandleDataCodeHandleDataCodeHandleDataCodeHandledataCodeHandledata_code_handle) must be passed to get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects. In addition, in CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandlecandidate_handle 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_resultsGetDataCode2dResultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results) must be passed. These handles are returned by find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dFindDataCode2dfind_data_code_2d for all successfully decoded symbols and by get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results for a group of candidates. If these operators return several handles in a tuple, the individual handles can be accessed by normal tuple operations.

For an explanation of the concept of the 2D data code reader see the introduction of chapter Identification / Data Code

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_paramSetDataCode2dParamSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param, 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_paramSetDataCode2dParamSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param). The persistence must be set before calling find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dFindDataCode2dfind_data_code_2d, either while creating the model with create_data_code_2d_modelcreate_data_code_2d_modelCreateDataCode2dModelCreateDataCode2dModelCreateDataCode2dModelcreate_data_code_2d_model or with set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param

Currently, the following iconic objects can be retrieved:

Regions of the modules

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 CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandlecandidate_handle. 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.

执行信息

参数

DataCodeObjectsDataCodeObjectsDataCodeObjectsDataCodeObjectsdataCodeObjectsdata_code_objects (输出对象)  object(-array) objectHObjectHObjectHObjectHobject *

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

DataCodeHandleDataCodeHandleDataCodeHandleDataCodeHandledataCodeHandledata_code_handle (输入控制)  datacode_2d HDataCode2D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 2D data code model.

CandidateHandleCandidateHandleCandidateHandleCandidateHandlecandidateHandlecandidate_handle (输入控制)  integer HTupleUnion[int, str]HTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)

Handle of the 2D data code candidate. Either an integer (usually the ResultHandle of find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dFindDataCode2dfind_data_code_2d) or a string representing a group of candidates.

默认值: 'all_candidates' "all_candidates" "all_candidates" "all_candidates" "all_candidates" "all_candidates"

建议值: 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"

ObjectNameObjectNameObjectNameObjectNameobjectNameobject_name (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the iconic object to return.

默认值: 'candidate_xld' "candidate_xld" "candidate_xld" "candidate_xld" "candidate_xld" "candidate_xld"

值列表: '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"

示例(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)
set_data_code_2d_param (DataCodeHandle, 'default_parameters', \
                        'maximum_recognition')
set_data_code_2d_param (DataCodeHandle, 'persistence', 1)
* Read an image
read_image (Image, 'datacode/ecc200/ecc200_disturbed_012')
* 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
  * Display image.
  dev_display (Image)
  dev_set_draw ('margin')
  * Get the contour of the symbol.
  dev_set_color ('blue')
  get_data_code_2d_objects (SymbolXLD, DataCodeHandle, \
                            HandlesUndecoded[I], 'candidate_xld')
  dev_display (SymbolXLD)
  * Get the module regions of the foreground modules
  dev_set_color ('green')
  get_data_code_2d_objects (ModuleFG, DataCodeHandle, \
                            HandlesUndecoded[I], 'module_1_rois')
  dev_display (ModuleFG)
  * Get the module regions of the background modules
  dev_set_color ('red')
  get_data_code_2d_objects (ModuleBG, DataCodeHandle, \
                            HandlesUndecoded[I], 'module_0_rois')
  dev_display (ModuleBG)
  * Stop for inspecting the image.
  stop ()
endfor

* Clear the model
clear_data_code_2d_model (DataCodeHandle)

结果

算子 get_data_code_2d_objectsget_data_code_2d_objectsGetDataCode2dObjectsGetDataCode2dObjectsGetDataCode2dObjectsget_data_code_2d_objects 返回值 2 ( H_MSG_TRUE) if the given parameters are correct and the requested objects are available for the last symbol search.否则,将抛出异常。

可能的前趋

find_data_code_2dfind_data_code_2dFindDataCode2dFindDataCode2dFindDataCode2dfind_data_code_2d, query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_params

可能的后继

get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results

另见

query_data_code_2d_paramsquery_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_params, get_data_code_2d_resultsget_data_code_2d_resultsGetDataCode2dResultsGetDataCode2dResultsGetDataCode2dResultsget_data_code_2d_results, get_data_code_2d_paramget_data_code_2d_paramGetDataCode2dParamGetDataCode2dParamGetDataCode2dParamget_data_code_2d_param, set_data_code_2d_paramset_data_code_2d_paramSetDataCode2dParamSetDataCode2dParamSetDataCode2dParamset_data_code_2d_param

模块

数据码