set_reference_templateT_set_reference_templateSetReferenceTemplateSetReferenceTemplateset_reference_template (算子)

名称

set_reference_templateT_set_reference_templateSetReferenceTemplateSetReferenceTemplateset_reference_template — 定义匹配模板的参考位置。

警告

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template 已过时,仅出于向后兼容性考虑而保留。新应用程序应改用基于形状或基于 NCC 的算子。

签名

set_reference_template( : : TemplateID, Row, Column : )

Herror T_set_reference_template(const Htuple TemplateID, const Htuple Row, const Htuple Column)

void SetReferenceTemplate(const HTuple& TemplateID, const HTuple& Row, const HTuple& Column)

void HTemplate::SetReferenceTemplate(double Row, double Column) const

static void HOperatorSet.SetReferenceTemplate(HTuple templateID, HTuple row, HTuple column)

void HTemplate.SetReferenceTemplate(double row, double column)

def set_reference_template(template_id: HHandle, row: float, column: float) -> None

描述

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template allows to define a new reference position for a template. As default after calling create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template or create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot the center of gravity of the template is used. Using set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template the reference position can be redefined. In the case of the center of gravity as reference the vector (0,0) is returned after matching for a null translation of the pattern relative to the image.

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (输入控制,状态被修改)  template HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

模板编号。

RowRowRowRowrowrow (输入控制)  point.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Reference position of template (row).

ColumnColumnColumnColumncolumncolumn (输入控制)  point.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Reference position of template (column).

结果

如果参数值正确,算子 set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template, create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot, read_templateread_templateReadTemplateReadTemplateReadTemplateread_template, adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template

可能的后继

best_matchbest_matchBestMatchBestMatchBestMatchbest_match, best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg, best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot, fast_matchfast_matchFastMatchFastMatchFastMatchfast_match, fast_match_mgfast_match_mgFastMatchMgFastMatchMgFastMatchMgfast_match_mg

模块

匹配