set_reference_templateT_set_reference_templateSetReferenceTemplateSetReferenceTemplateset_reference_template (Operator)

Name

set_reference_templateT_set_reference_templateSetReferenceTemplateSetReferenceTemplateset_reference_template — Define reference position for a matching template.

Warning

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateset_reference_template is obsolete and is only provided for reasons of backward compatibility. The operator will be removed with HALCON 25.11. New applications should use the shape-based or NCC-based operators instead.

Signature

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

Description

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateset_reference_template allows to define a new reference position for a template. As default after calling create_templatecreate_templateCreateTemplateCreateTemplatecreate_template or create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotcreate_template_rot the center of gravity of the template is used. Using set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateset_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.

Execution Information

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

TemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (input_control, state is modified)  template HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Template number.

RowRowRowrowrow (input_control)  point.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Reference position of template (row).

ColumnColumnColumncolumncolumn (input_control)  point.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Reference position of template (column).

Result

If the parameter values are correct, the operator set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateset_reference_template returns the value 2 ( H_MSG_TRUE) . If necessary, an exception is raised.

Possible Predecessors

create_templatecreate_templateCreateTemplateCreateTemplatecreate_template, create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotcreate_template_rot, read_templateread_templateReadTemplateReadTemplateread_template, adapt_templateadapt_templateAdaptTemplateAdaptTemplateadapt_template

Possible Successors

best_matchbest_matchBestMatchBestMatchbest_match, best_match_mgbest_match_mgBestMatchMgBestMatchMgbest_match_mg, best_match_rotbest_match_rotBestMatchRotBestMatchRotbest_match_rot, fast_matchfast_matchFastMatchFastMatchfast_match, fast_match_mgfast_match_mgFastMatchMgFastMatchMgfast_match_mg

Module

Matching