best_match_pre_mgT_best_match_pre_mgBestMatchPreMgBestMatchPreMgbest_match_pre_mg最佳匹配预生成多重网格(算子)
名称
best_match_pre_mgT_best_match_pre_mgBestMatchPreMgBestMatchPreMgbest_match_pre_mg — 在预生成的金字塔中搜索最佳灰度值匹配。
警告
best_match_pre_mgbest_match_pre_mgBestMatchPreMgBestMatchPreMgBestMatchPreMgbest_match_pre_mg 已过时,仅出于向后兼容性考虑而保留。新应用程序应改用基于形状或基于 NCC 的算子。
签名
void BestMatchPreMg(const HObject& ImagePyramid, const HTuple& TemplateID, const HTuple& MaxError, const HTuple& SubPixel, const HTuple& NumLevels, const HTuple& WhichLevels, HTuple* Row, HTuple* Column, HTuple* Error)
void HTemplate::BestMatchPreMg(const HImage& ImagePyramid, double MaxError, const HString& SubPixel, Hlong NumLevels, const HTuple& WhichLevels, double* Row, double* Column, double* Error) const
void HTemplate::BestMatchPreMg(const HImage& ImagePyramid, double MaxError, const HString& SubPixel, Hlong NumLevels, Hlong WhichLevels, double* Row, double* Column, double* Error) const
void HTemplate::BestMatchPreMg(const HImage& ImagePyramid, double MaxError, const char* SubPixel, Hlong NumLevels, Hlong WhichLevels, double* Row, double* Column, double* Error) const
void HTemplate::BestMatchPreMg(const HImage& ImagePyramid, double MaxError, const wchar_t* SubPixel, Hlong NumLevels, Hlong WhichLevels, double* Row, double* Column, double* Error) const
(
Windows only)
void HImage::BestMatchPreMg(const HTemplate& TemplateID, double MaxError, const HString& SubPixel, Hlong NumLevels, const HTuple& WhichLevels, double* Row, double* Column, double* Error) const
void HImage::BestMatchPreMg(const HTemplate& TemplateID, double MaxError, const HString& SubPixel, Hlong NumLevels, Hlong WhichLevels, double* Row, double* Column, double* Error) const
void HImage::BestMatchPreMg(const HTemplate& TemplateID, double MaxError, const char* SubPixel, Hlong NumLevels, Hlong WhichLevels, double* Row, double* Column, double* Error) const
void HImage::BestMatchPreMg(const HTemplate& TemplateID, double MaxError, const wchar_t* SubPixel, Hlong NumLevels, Hlong WhichLevels, double* Row, double* Column, double* Error) const
(
Windows only)
static void HOperatorSet.BestMatchPreMg(HObject imagePyramid, HTuple templateID, HTuple maxError, HTuple subPixel, HTuple numLevels, HTuple whichLevels, out HTuple row, out HTuple column, out HTuple error)
void HTemplate.BestMatchPreMg(HImage imagePyramid, double maxError, string subPixel, int numLevels, HTuple whichLevels, out double row, out double column, out double error)
void HTemplate.BestMatchPreMg(HImage imagePyramid, double maxError, string subPixel, int numLevels, int whichLevels, out double row, out double column, out double error)
void HImage.BestMatchPreMg(HTemplate templateID, double maxError, string subPixel, int numLevels, HTuple whichLevels, out double row, out double column, out double error)
void HImage.BestMatchPreMg(HTemplate templateID, double maxError, string subPixel, int numLevels, int whichLevels, out double row, out double column, out double error)
描述
best_match_pre_mgbest_match_pre_mgBestMatchPreMgBestMatchPreMgBestMatchPreMgbest_match_pre_mg 采用图像金字塔进行灰度值匹配。best_match_pre_mgbest_match_pre_mgBestMatchPreMgBestMatchPreMgBestMatchPreMgbest_match_pre_mg 工作原理与 best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg 类似,但利用预先计算的金字塔——该金字塔需通过 gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramid 预先生成。当需要执行多次匹配或金字塔需作其他用途时,此方法可缩短运行时间。生成金字塔时需使用 0.5 的缩放因子及 'constant'"constant""constant""constant""constant""constant" 模式。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ImagePyramidImagePyramidImagePyramidImagePyramidimagePyramidimage_pyramid (输入对象) singlechannelimage-array → objectHImageHObjectHImageHobject (byte)
图像金字塔,其内部需寻找模式。
TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (输入控制) template → HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
模板编号。
MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error (输入控制) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
灰度值的最大平均差值。
默认值:
30.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
建议增量:
3
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
WhichLevelsWhichLevelsWhichLevelsWhichLevelswhichLevelswhich_levels (输入控制) integer → HTupleUnion[str, int]HTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)
使用“最佳匹配”方法的分辨率上限。
默认值:
'original'
"original"
"original"
"original"
"original"
"original"
建议值:
'all'"all""all""all""all""all", 'original'"original""original""original""original""original", 0, 1, 2, 3, 4, 5, 6
RowRowRowRowrowrow (输出控制) point.y → HTuplefloatHTupleHtuple (real) (double) (double) (double)
最佳匹配的行位置。
ColumnColumnColumnColumncolumncolumn (输出控制) point.x → HTuplefloatHTupleHtuple (real) (double) (double) (double)
最佳匹配的列位置。
ErrorErrorErrorErrorerrorerror (输出控制) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
最佳匹配的灰度值平均差异。
结果
如果参数值正确,算子 best_match_pre_mgbest_match_pre_mgBestMatchPreMgBestMatchPreMgBestMatchPreMgbest_match_pre_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>)。如有必要,则抛出异常。
可能的前趋
gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramid,
create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template,
read_templateread_templateReadTemplateReadTemplateReadTemplateread_template,
adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template,
draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region,
draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template
替代
fast_matchfast_matchFastMatchFastMatchFastMatchfast_match,
fast_match_mgfast_match_mgFastMatchMgFastMatchMgFastMatchMgfast_match_mg,
exhaustive_matchexhaustive_matchExhaustiveMatchExhaustiveMatchExhaustiveMatchexhaustive_match,
exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMgexhaustive_match_mg
模块
匹配