best_match_rot_mgT_best_match_rot_mgBestMatchRotMgBestMatchRotMgbest_match_rot_mg最佳匹配旋转多重网格(算子)

名称

best_match_rot_mgT_best_match_rot_mgBestMatchRotMgBestMatchRotMgbest_match_rot_mg — 通过旋转搜索模板和金字塔的最佳匹配。

警告

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

签名

best_match_rot_mg(Image : : TemplateID, AngleStart, AngleExtend, MaxError, SubPixel, NumLevels : Row, Column, Angle, Error)

Herror T_best_match_rot_mg(const Hobject Image, const Htuple TemplateID, const Htuple AngleStart, const Htuple AngleExtend, const Htuple MaxError, const Htuple SubPixel, const Htuple NumLevels, Htuple* Row, Htuple* Column, Htuple* Angle, Htuple* Error)

void BestMatchRotMg(const HObject& Image, const HTuple& TemplateID, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& MaxError, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error)

void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error) const

void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const

void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const char* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const

void HTemplate::BestMatchRotMg(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const wchar_t* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const   ( Windows only)

void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error) const

void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const

void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const char* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const

void HImage::BestMatchRotMg(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const wchar_t* SubPixel, Hlong NumLevels, double* Row, double* Column, double* Angle, double* Error) const   ( Windows only)

static void HOperatorSet.BestMatchRotMg(HObject image, HTuple templateID, HTuple angleStart, HTuple angleExtend, HTuple maxError, HTuple subPixel, HTuple numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)

void HTemplate.BestMatchRotMg(HImage image, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)

void HTemplate.BestMatchRotMg(HImage image, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out double row, out double column, out double angle, out double error)

void HImage.BestMatchRotMg(HTemplate templateID, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)

void HImage.BestMatchRotMg(HTemplate templateID, double angleStart, double angleExtend, double maxError, string subPixel, int numLevels, out double row, out double column, out double angle, out double error)

def best_match_rot_mg(image: HObject, template_id: HHandle, angle_start: float, angle_extend: float, max_error: float, sub_pixel: str, num_levels: int) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def best_match_rot_mg_s(image: HObject, template_id: HHandle, angle_start: float, angle_extend: float, max_error: float, sub_pixel: str, num_levels: int) -> Tuple[float, float, float, float]

描述

算子 best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mgTemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id 的模板与 ImageImageImageImageimageimage 图像进行匹配。其工作原理类似于 best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg ,但扩展了模式旋转功能,类似于 best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot。参数 AngleStartAngleStartAngleStartAngleStartangleStartangle_startAngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend 定义模式的最大旋转范围: AngleStartAngleStartAngleStartAngleStartangleStartangle_start 指定逆时针方向的最大旋转角度, AngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend 则指定相对于该角度的顺时针方向最大旋转角度。这两个值必须小于或等于创建模式时使用的值(参见 create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot)。与 best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg 不同,best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg 会额外返回模式的旋转角度 AngleAngleAngleAngleangleangle(单位:弧度)。

MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error 的值必须设置得比 best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot 算子更大,因为金字塔更高层级处的误差通常更大。

SubPixelSubPixelSubPixelSubPixelsubPixelsub_pixel = 'true'"true""true""true""true""true" 时,位置和角度将以“亚像素”精度进行计算。

NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels 的值必须等于或小于创建模板时使用的值。

执行信息

参数

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

需要在其中查找模式的输入图像。

TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (输入控制)  template HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

模板编号。

AngleStartAngleStartAngleStartAngleStartangleStartangle_start (输入控制)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

模式的最小旋转角度(弧度)。

默认值: -0.39

建议值: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0

AngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend (输入控制)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

AngleStartAngleStartAngleStartAngleStartangleStartangle_start 的最大正向延伸。

默认值: 0.79

建议值: 6.28, 3.14, 1.57, 0.79, 0.39

限制: AngleExtend > 0

MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

灰度值的最大平均差值。

默认值: 40.0

建议值: 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 9.0, 11.0, 15.0, 17.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0

值范围: 0 ≤ MaxError MaxError MaxError MaxError maxError max_error ≤ 255

最小增量: 1

建议增量: 1

SubPixelSubPixelSubPixelSubPixelsubPixelsub_pixel (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

当为 'true'"true""true""true""true""true" 时,实现亚像素级精度。

默认值: 'false' "false" "false" "false" "false" "false"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

使用的分辨率级别数量。

默认值: 3

建议值: 1, 2, 3, 4, 5, 6

RowRowRowRowrowrow (输出控制)  point.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

最佳匹配的行位置。

ColumnColumnColumnColumncolumncolumn (输出控制)  point.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

最佳匹配的列位置。

AngleAngleAngleAngleangleangle (输出控制)  angle.rad(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

模式旋转角度(弧度)。

ErrorErrorErrorErrorerrorerror (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

最佳匹配的灰度值平均差异。

结果

如果参数值正确,算子 best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg 返回值 2 ( H_MSG_TRUE )。当输入为空(没有可用输入图像)时,可设置行为通过算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。

可能的前趋

create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot, set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template, set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template, adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

替代

best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot, best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg, find_ncc_modelfind_ncc_modelFindNccModelFindNccModelFindNccModelfind_ncc_model, find_ncc_modelsfind_ncc_modelsFindNccModelsFindNccModelsFindNccModelsfind_ncc_models

另见

fast_matchfast_matchFastMatchFastMatchFastMatchfast_match

模块

匹配