exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgexhaustive_match_mg (算子)

名称

exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgexhaustive_match_mg — 在分辨率金字塔中匹配模板和图像。

签名

exhaustive_match_mg(Image, ImageTemplate : ImageMatch : Mode, Level, Threshold : )

Herror exhaustive_match_mg(const Hobject Image, const Hobject ImageTemplate, Hobject* ImageMatch, const char* Mode, const Hlong Level, const Hlong Threshold)

Herror T_exhaustive_match_mg(const Hobject Image, const Hobject ImageTemplate, Hobject* ImageMatch, const Htuple Mode, const Htuple Level, const Htuple Threshold)

void ExhaustiveMatchMg(const HObject& Image, const HObject& ImageTemplate, HObject* ImageMatch, const HTuple& Mode, const HTuple& Level, const HTuple& Threshold)

HImage HImage::ExhaustiveMatchMg(const HImage& ImageTemplate, const HString& Mode, Hlong Level, Hlong Threshold) const

HImage HImage::ExhaustiveMatchMg(const HImage& ImageTemplate, const char* Mode, Hlong Level, Hlong Threshold) const

HImage HImage::ExhaustiveMatchMg(const HImage& ImageTemplate, const wchar_t* Mode, Hlong Level, Hlong Threshold) const   ( Windows only)

static void HOperatorSet.ExhaustiveMatchMg(HObject image, HObject imageTemplate, out HObject imageMatch, HTuple mode, HTuple level, HTuple threshold)

HImage HImage.ExhaustiveMatchMg(HImage imageTemplate, string mode, int level, int threshold)

def exhaustive_match_mg(image: HObject, image_template: HObject, mode: str, level: int, threshold: int) -> HObject

描述

算子 exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMgexhaustive_match_mg is an additional option for the operator exhaustive_matchexhaustive_matchExhaustiveMatchExhaustiveMatchExhaustiveMatchexhaustive_match performing a matching of the image ImageImageImageImageimageimage and the template ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplateimage_template. Hereby ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplateimage_template will be moved over all points of the region of ImageImageImageImageimageimage, a matching criterion will be calculated with regard to the parameter ModeModeModeModemodemode and the result values will be stored in ImageMatchImageMatchImageMatchImageMatchimageMatchimage_match

Of images having been filtered this way, normally only those areas with good matching results are of interest. The size of the area to be searched, i.e. the region of the input image ImageImageImageImageimageimage, determines decisively the runtime of the matching filter. Therefore it is recommendable to use at first exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMgexhaustive_match_mg with reduced image resolution in order to determine a “region of interest” in which good matching results can be expected; then in this restricted area only the real matching (see also exhaustive_matchexhaustive_matchExhaustiveMatchExhaustiveMatchExhaustiveMatchexhaustive_match) will be executed with normal resolution.

Hereby the Gauss-pyramids of ImageImageImageImageimageimage and ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplateimage_template will be composed (in particular the corresponding regions will be transformed as well). Then on each level of the resolution pyramids - starting with the startlevel LevelLevelLevelLevellevellevel - the matching inside the current “region of interest” will be executed. Whereby the “region of interest” on the startlevel is equivalent to the region of the input image ImageImageImageImageimageimage. After the filtering, a new “region of interest” is determined with the help of a threshold operation and will be transformed on the next resolution level:

threshold(...:...:0,Threshold,...:), if Mode = 'dfd' threshold(...:...:Threshold,255,...:), if Mode = 'norm_correlation'

The final matching in the determined “region of interest” will then be calculated with the highest resolution (LevelLevelLevelLevellevellevel 0). The output image ImageMatchImageMatchImageMatchImageMatchimageMatchimage_match includes the corresponding filter result and the final “region of interest”, which is determined on the result image with the help of a threshold operation.

算子 exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMgexhaustive_match_mg therefore is not simply a filter, but can also be considered as a member of the class of region transformations.

执行信息

参数

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

输入图像。

ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplateimage_template (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte)

The domain of this image will be matched with ImageImageImageImageimageimage

ImageMatchImageMatchImageMatchImageMatchimageMatchimage_match (输出对象)  image(-array) objectHImageHObjectHImageHobject * (byte)

Result image and result region: values of the matching criterion within the determined “region of interest”.

元素数量: ImageMatch == Image

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

Desired matching criterion.

默认值: 'dfd' "dfd" "dfd" "dfd" "dfd" "dfd"

值列表: 'dfd'"dfd""dfd""dfd""dfd""dfd", 'norm_correlation'"norm_correlation""norm_correlation""norm_correlation""norm_correlation""norm_correlation"

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

Startlevel in the resolution pyramid (highest resolution: Level 0).

默认值: 1

建议值: 0, 1, 2, 3, 4, 5, 6, 7, 8

限制: Level <= ld(width(Image)) && Level <= ld(height(Image)) && Level <= ld(width(ImageTemplate)) && Level <= ld(height(ImageTemplate))

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

Threshold to determine the “region of interest”.

默认值: 30

建议值: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250

值范围: 0 ≤ Threshold Threshold Threshold Threshold threshold threshold ≤ 255

最小增量: 1

建议增量: 5

示例(C)

read_image(&Image,"monkey");
disp_image(Image,WindowHandle);
draw_rectangle2(WindowHandle,&Row,&Column,&Phi,&Length1,&Length2);
gen_rectangle2(&Rectangle,Row,Column,Phi,Length1,Length2);
reduce_domain(Image,Rectangle,&Template);
exhaustive_match_mg(Image,Template,&ImageMatch,'dfd'1,30);
invert_image(ImageMatch,&ImageInvert);
local_max(ImageInvert,&BestFit);
disp_region(BestFit,WindowHandle);

结果

如果参数值正确,算子 exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMgexhaustive_match_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>)。如有必要,则抛出异常。

可能的前趋

draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1

可能的后继

thresholdthresholdThresholdThresholdThresholdthreshold, local_maxlocal_maxLocalMaxLocalMaxLocalMaxlocal_max

替代

exhaustive_matchexhaustive_matchExhaustiveMatchExhaustiveMatchExhaustiveMatchexhaustive_match

另见

gen_gauss_pyramidgen_gauss_pyramidGenGaussPyramidGenGaussPyramidGenGaussPyramidgen_gauss_pyramid

模块

基础