query_bar_code_paramsT_query_bar_code_paramsQueryBarCodeParamsQueryBarCodeParamsquery_bar_code_params (算子)

名称

query_bar_code_paramsT_query_bar_code_paramsQueryBarCodeParamsQueryBarCodeParamsquery_bar_code_params — 获取给定条形码模型的 set_bar_code* 和Get_bar_code* 算子中可以使用的参数名称。

签名

query_bar_code_params( : : BarCodeHandle, Properties : GenParamName)

Herror T_query_bar_code_params(const Htuple BarCodeHandle, const Htuple Properties, Htuple* GenParamName)

void QueryBarCodeParams(const HTuple& BarCodeHandle, const HTuple& Properties, HTuple* GenParamName)

HTuple HBarCode::QueryBarCodeParams(const HString& Properties) const

HTuple HBarCode::QueryBarCodeParams(const char* Properties) const

HTuple HBarCode::QueryBarCodeParams(const wchar_t* Properties) const   ( Windows only)

static void HOperatorSet.QueryBarCodeParams(HTuple barCodeHandle, HTuple properties, out HTuple genParamName)

HTuple HBarCode.QueryBarCodeParams(string properties)

def query_bar_code_params(bar_code_handle: HHandle, properties: str) -> Sequence[str]

def query_bar_code_params_s(bar_code_handle: HHandle, properties: str) -> str

描述

算子 query_bar_code_paramsquery_bar_code_paramsQueryBarCodeParamsQueryBarCodeParamsQueryBarCodeParamsquery_bar_code_params returns parameter names of the bar code model that correspond to the selection given in PropertiesPropertiesPropertiesPropertiespropertiesproperties. To explain this, here first some background: After creating a bar code model, all parameters are initially set 'general'"general""general""general""general""general", i.e., they have the same values set for each supported bar code type. During automatic parameter training or after calling the operator set_bar_code_param_specificset_bar_code_param_specificSetBarCodeParamSpecificSetBarCodeParamSpecificSetBarCodeParamSpecificset_bar_code_param_specific some parameters might become bar code type specific at runtime. These parameters can not be read with the general operator get_bar_code_paramget_bar_code_paramGetBarCodeParamGetBarCodeParamGetBarCodeParamget_bar_code_param but must be read for a given bar code type with get_bar_code_param_specificget_bar_code_param_specificGetBarCodeParamSpecificGetBarCodeParamSpecificGetBarCodeParamSpecificget_bar_code_param_specific。To make this access easy and generic, the output GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name of query_bar_code_paramsquery_bar_code_paramsQueryBarCodeParamsQueryBarCodeParamsQueryBarCodeParamsquery_bar_code_params can be used as input parameter GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name in get_bar_code_paramget_bar_code_paramGetBarCodeParamGetBarCodeParamGetBarCodeParamget_bar_code_param or get_bar_code_param_specificget_bar_code_param_specificGetBarCodeParamSpecificGetBarCodeParamSpecificGetBarCodeParamSpecificget_bar_code_param_specific, depending on PropertiesPropertiesPropertiesPropertiespropertiesproperties='*general'"*general""*general""*general""*general""*general" or PropertiesPropertiesPropertiesPropertiespropertiesproperties='*specific'"*specific""*specific""*specific""*specific""*specific".

Please note that you could alternatively use a static tuple of parameter names for get_bar_code_paramget_bar_code_paramGetBarCodeParamGetBarCodeParamGetBarCodeParamget_bar_code_param or get_bar_code_param_specificget_bar_code_param_specificGetBarCodeParamSpecificGetBarCodeParamSpecificGetBarCodeParamSpecificget_bar_code_param_specific (e.g., the parameter names described with these operators), but this is inflexible and therefore not recommended.

Possible values for PropertiesPropertiesPropertiesPropertiespropertiesproperties are:

'all'"all""all""all""all""all"

Returns the names of all parameters supported by the bar code reader. The names are independent of the bar code model given in BarCodeHandleBarCodeHandleBarCodeHandleBarCodeHandlebarCodeHandlebar_code_handle

'general'"general""general""general""general""general"

Returns the names of the parameters that contain the same values for all supported bar code types, i.e., there are no specific values set for certain bar code types, e.g., with set_bar_code_param_specificset_bar_code_param_specificSetBarCodeParamSpecificSetBarCodeParamSpecificSetBarCodeParamSpecificset_bar_code_param_specific。The values of only these parameters can be read with get_bar_code_paramget_bar_code_paramGetBarCodeParamGetBarCodeParamGetBarCodeParamget_bar_code_param

Please note that the parameter name 'train'"train""train""train""train""train" is explicitly excluded here. 'train'"train""train""train""train""train" in a following call to get_bar_code_paramget_bar_code_paramGetBarCodeParamGetBarCodeParamGetBarCodeParamget_bar_code_param would return a multivalue tuple and therefore couldn't be used within one tuple in combination with other parameter names.

'specific'"specific""specific""specific""specific""specific"

Returns the names of the parameters that contain specific values for certain bar code types. The values of these parameters must be read with get_bar_code_param_specificget_bar_code_param_specificGetBarCodeParamSpecificGetBarCodeParamSpecificGetBarCodeParamSpecificget_bar_code_param_specific instead of get_bar_code_paramget_bar_code_paramGetBarCodeParamGetBarCodeParamGetBarCodeParamget_bar_code_param。Bar code type specific values can occur in conjunction with bar code autodiscrimination, described with the operator find_bar_codefind_bar_codeFindBarCodeFindBarCodeFindBarCodefind_bar_code or automatic parameter training.

'trained_general'"trained_general""trained_general""trained_general""trained_general""trained_general"

Returns the names of parameters that have already been trained and contain the same values for all supported bar code types. The training mode is described with the operator set_bar_code_paramset_bar_code_paramSetBarCodeParamSetBarCodeParamSetBarCodeParamset_bar_code_param

'trained_specific'"trained_specific""trained_specific""trained_specific""trained_specific""trained_specific"

Returns the names of the parameters that have already been trained and contain specific values for certain bar code types. The training mode is described with the operator set_bar_code_paramset_bar_code_paramSetBarCodeParamSetBarCodeParamSetBarCodeParamset_bar_code_param

执行信息

参数

BarCodeHandleBarCodeHandleBarCodeHandleBarCodeHandlebarCodeHandlebar_code_handle (输入控制)  barcode HBarCode, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the bar code model.

PropertiesPropertiesPropertiesPropertiespropertiesproperties (输入控制)  attribute.name HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Properties of the parameters.

默认值: 'trained_general' "trained_general" "trained_general" "trained_general" "trained_general" "trained_general"

值列表: 'all'"all""all""all""all""all", 'general'"general""general""general""general""general", 'specific'"specific""specific""specific""specific""specific", 'trained_general'"trained_general""trained_general""trained_general""trained_general""trained_general", 'trained_specific'"trained_specific""trained_specific""trained_specific""trained_specific""trained_specific"

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输出控制)  attribute.name(-array) HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

通用参数的名称。

示例(HDevelop)

TrainParams := ['element_size_min', 'element_size_max', 'orientation']
Train3times := gen_tuple_const(|TrainParams|,'train')
create_bar_code_model (Train3times, TrainParams, BarCodeHandle)
find_bar_code (Image, SymbolRegions, BarCodeHandle, 'EAN-13', \
               DecodedDataStrings)
query_bar_code_params (BarCodeHandle, 'trained_general', NamesGen)
* returns NamesGen = ['element_size_max', 'element_size_min']
get_bar_code_param (BarCodeHandle, NamesGen, ValGen)
* returns e.g., ValGen = [4.0, 1.5]
query_bar_code_params (BarCodeHandle, 'trained_specific', NamesSpec)
* returns NamesSpec = ['orientation', 'orientation_tol']
get_bar_code_param_specific (BarCodeHandle, 'EAN-13', NamesSpec, ValSpec)
* returns e.g., ValSpec = [89.9127, 0.5]

结果

算子 query_bar_code_paramsquery_bar_code_paramsQueryBarCodeParamsQueryBarCodeParamsQueryBarCodeParamsquery_bar_code_params 返回值 2 ( H_MSG_TRUE) if the given parameters are correct.否则,将抛出异常。

可能的前趋

find_bar_codefind_bar_codeFindBarCodeFindBarCodeFindBarCodefind_bar_code, decode_bar_code_rectangle2decode_bar_code_rectangle2DecodeBarCodeRectangle2DecodeBarCodeRectangle2DecodeBarCodeRectangle2decode_bar_code_rectangle2

可能的后继

get_bar_code_paramget_bar_code_paramGetBarCodeParamGetBarCodeParamGetBarCodeParamget_bar_code_param, get_bar_code_param_specificget_bar_code_param_specificGetBarCodeParamSpecificGetBarCodeParamSpecificGetBarCodeParamSpecificget_bar_code_param_specific

模块

条形码