ClassesClasses | | Operators

read_templateread_templateReadTemplateReadTemplate (Operator)

Name

read_templateread_templateReadTemplateReadTemplate — Reading a template from file.

Warning

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

Signature

read_template( : : FileName : TemplateID)

Herror read_template(const char* FileName, Hlong* TemplateID)

Herror T_read_template(const Htuple FileName, Htuple* TemplateID)

void ReadTemplate(const HTuple& FileName, HTuple* TemplateID)

void HTemplate::HTemplate(const HString& FileName)

void HTemplate::HTemplate(const char* FileName)

void HTemplate::ReadTemplate(const HString& FileName)

void HTemplate::ReadTemplate(const char* FileName)

static void HOperatorSet.ReadTemplate(HTuple fileName, out HTuple templateID)

public HTemplate(string fileName)

void HTemplate.ReadTemplate(string fileName)

Description

The operator read_templateread_templateReadTemplateReadTemplateReadTemplate reads a matching template from file which has been written with write_templatewrite_templateWriteTemplateWriteTemplateWriteTemplate. The default HALCON file extension for a template is 'gvt'.

Execution Information

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

FileNameFileNameFileNameFileNamefileName (input_control)  filename.read HTupleHTupleHtuple (string) (string) (HString) (char*)

file name.

File extension: .gvt

TemplateIDTemplateIDTemplateIDTemplateIDtemplateID (output_control)  template HTemplate, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Template number.

Result

If the file name is valid, the operator read_templateread_templateReadTemplateReadTemplateReadTemplate returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Successors

adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplate, set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplate, set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplate, best_matchbest_matchBestMatchBestMatchBestMatch, fast_matchfast_matchFastMatchFastMatchFastMatch, best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRot

Module

Matching


ClassesClasses | | Operators