read_templateT_read_templateReadTemplateReadTemplateread_template (算子)
名称
read_templateT_read_templateReadTemplateReadTemplateread_template — 从文件中读取模板。
警告
read_templateread_templateReadTemplateReadTemplateReadTemplateread_template 已过时,仅出于向后兼容性考虑而保留。新应用程序应改用基于形状或基于 NCC 的算子。
签名
描述
算子 read_templateread_templateReadTemplateReadTemplateReadTemplateread_template reads a matching template
from file which has been written with write_templatewrite_templateWriteTemplateWriteTemplateWriteTemplatewrite_template。The default HALCON file extension for a
template is 'gvt'.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
参数
FileNameFileNameFileNameFileNamefileNamefile_name (输入控制) filename.read → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
file name.
File extension:
.gvt
TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (输出控制) template → HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
模板编号。
结果
If the file name is valid, the operator
read_templateread_templateReadTemplateReadTemplateReadTemplateread_template 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的后继
adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template,
set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template,
set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template,
best_matchbest_matchBestMatchBestMatchBestMatchbest_match,
fast_matchfast_matchFastMatchFastMatchFastMatchfast_match,
best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot
模块
匹配