HALCON Reference Manual 10.0.2
Table of Contents / Matching / Gray-Value-Based ClassesClassesClasses | | | Operators

set_reference_templateset_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplate (Operator)

Name

set_reference_templateset_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplate — Define reference position for a matching template.

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)

Herror set_reference_template(const HTuple& TemplateID, const HTuple& Row, const HTuple& Column)

void HTemplate::SetReferenceTemplate(const HTuple& Row, const HTuple& Column) const

void HOperatorSetX.SetReferenceTemplate(
[in] VARIANT TemplateID, [in] VARIANT Row, [in] VARIANT Column)

void HTemplateX.SetReferenceTemplate(
[in] double Row, [in] double Column)

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

void HTemplate.SetReferenceTemplate(double row, double column)

Description

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

Parallelization

Parameters

TemplateIDTemplateIDTemplateIDTemplateIDtemplateID (input_control)  template HTemplate, HTupleHTemplate, HTupleHTemplateX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Template number.

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

Reference position of template (row).

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

Reference position of template (column).

Result

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

Possible Predecessors

create_templatecreate_templatecreate_templateCreateTemplateCreateTemplate, create_template_rotcreate_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRot, read_templateread_templateread_templateReadTemplateReadTemplate, adapt_templateadapt_templateadapt_templateAdaptTemplateAdaptTemplate

Possible Successors

best_matchbest_matchbest_matchBestMatchBestMatch, best_match_mgbest_match_mgbest_match_mgBestMatchMgBestMatchMg, best_match_rotbest_match_rotbest_match_rotBestMatchRotBestMatchRot, fast_matchfast_matchfast_matchFastMatchFastMatch, fast_match_mgfast_match_mgfast_match_mgFastMatchMgFastMatchMg

Module

Matching


Table of Contents / Matching / Gray-Value-Based ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH