adapt_template调整模板T_adapt_template调整模板AdaptTemplate调整模板AdaptTemplate调整模板adapt_template调整模板 (算子)

名称

adapt_template调整模板T_adapt_template调整模板AdaptTemplate调整模板AdaptTemplate调整模板adapt_template调整模板 — 使模板适应图像的大小。

警告

adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template 已过时,仅出于向后兼容性考虑而保留。新应用程序应改用基于形状或基于 NCC 的算子。

签名

adapt_template(Image : : TemplateID : )

Herror T_adapt_template(const Hobject Image, const Htuple TemplateID)

void AdaptTemplate(const HObject& Image, const HTuple& TemplateID)

void HTemplate::AdaptTemplate(const HImage& Image) const

void HImage::AdaptTemplate(const HTemplate& TemplateID) const

static void HOperatorSet.AdaptTemplate(HObject image, HTuple templateID)

void HTemplate.AdaptTemplate(HImage image)

void HImage.AdaptTemplate(HTemplate templateID)

def adapt_template(image: HObject, template_id: HHandle) -> None

描述

算子 adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template 用于将通过 create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template 创建的模板适配至图像尺寸。算子 adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template 可在模板用于其他尺寸的图像之前调用,或当用于创建模板的原始图像尺寸不同时调用。若未显式调用,系统将在每次使用不同图像尺寸时自动调用该算子。此时图像内容无关紧要,仅考虑 ImageImageImageImageimageimage 的宽度值。

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

ImageImageImageImageimageimage (输入对象)  singlechannelimage(-array) objectHImageHObjectHImageHobject (byte)

决定后续匹配大小的图像。

TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (输入控制,状态被修改)  template HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

模板编号。

结果

如果参数值正确,算子 adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template 返回值 2 ( H_MSG_TRUE) 。如有必要,则抛出异常。

可能的前趋

create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template, create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot, read_templateread_templateReadTemplateReadTemplateReadTemplateread_template

可能的后继

set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template, best_matchbest_matchBestMatchBestMatchBestMatchbest_match, fast_matchfast_matchFastMatchFastMatchFastMatchfast_match, fast_match_mgfast_match_mgFastMatchMgFastMatchMgFastMatchMgfast_match_mg, set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template, best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg, best_match_pre_mgbest_match_pre_mgBestMatchPreMgBestMatchPreMgBestMatchPreMgbest_match_pre_mg, best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot, best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg

模块

匹配