ClassesClasses | | Operators

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplate (Operator)

Name

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplate — Define reference position for a matching template.

Warning

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplate is obsolete and is only provided for reasons of backward compatibility. New applications should use the shape-based or NCC-based operators instead.

Signature

set_reference_template( : : TemplateID, Row, Column : )

Herror set_reference_template(const Hlong TemplateID, double Row, double 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)

Description

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplate allows to define a new reference position for a template. As default after calling create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplate or create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRot the center of gravity of the template is used. Using set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplate 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:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

TemplateIDTemplateIDTemplateIDTemplateIDtemplateID (input_control, state is modified)  template HTemplate, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Template number.

RowRowRowRowrow (input_control)  point.y HTupleHTupleHtuple (real) (double) (double) (double)

Reference position of template (row).

ColumnColumnColumnColumncolumn (input_control)  point.x HTupleHTupleHtuple (real) (double) (double) (double)

Reference position of template (column).

Result

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

Possible Predecessors

create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplate, create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRot, read_templateread_templateReadTemplateReadTemplateReadTemplate, adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplate

Possible Successors

best_matchbest_matchBestMatchBestMatchBestMatch, best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMg, best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRot, fast_matchfast_matchFastMatchFastMatchFastMatch, fast_match_mgfast_match_mgFastMatchMgFastMatchMgFastMatchMg

Module

Matching


ClassesClasses | | Operators