exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMg (Operator)


exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMg — Matching a template and an image in a resolution pyramid.


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)


The operator exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMg is an additional option for the operator exhaustive_matchexhaustive_matchExhaustiveMatchExhaustiveMatchExhaustiveMatch performing a matching of the image ImageImageImageImageimage and the template ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplate. Hereby ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplate will be moved over all points of the region of ImageImageImageImageimage, a matching criterion will be calculated with regard to the parameter ModeModeModeModemode and the result values will be stored in ImageMatchImageMatchImageMatchImageMatchimageMatch.

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 ImageImageImageImageimage, determines decisively the runtime of the matching filter. Therefore it is recommendable to use at first exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMg 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_matchExhaustiveMatchExhaustiveMatchExhaustiveMatch) will be executed with normal resolution.

Hereby the Gauss-pyramids of ImageImageImageImageimage and ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplate 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 LevelLevelLevelLevellevel - 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 ImageImageImageImageimage. 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 (LevelLevelLevelLevellevel 0). The output image ImageMatchImageMatchImageMatchImageMatchimageMatch 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.

The operator exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMg therefore is not simply a filter, but can also be considered as a member of the class of region transformations.

Execution Information


ImageImageImageImageimage (input_object)  singlechannelimage(-array) objectHImageHImageHobject (byte)

Input image.

ImageTemplateImageTemplateImageTemplateImageTemplateimageTemplate (input_object)  singlechannelimage objectHImageHImageHobject (byte)

The domain of this image will be matched with ImageImageImageImageimage.

ImageMatchImageMatchImageMatchImageMatchimageMatch (output_object)  image(-array) objectHImageHImageHobject * (byte)

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

Number of elements: ImageMatch == Image

ModeModeModeModemode (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Desired matching criterion.

Default value: 'dfd' "dfd" "dfd" "dfd" "dfd"

List of values: 'dfd'"dfd""dfd""dfd""dfd", 'norm_correlation'"norm_correlation""norm_correlation""norm_correlation""norm_correlation"

LevelLevelLevelLevellevel (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: 1

Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8

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

ThresholdThresholdThresholdThresholdthreshold (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Threshold to determine the “region of interest”.

Default value: 30

Suggested values: 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

Typical range of values: 0 ≤ Threshold Threshold Threshold Threshold threshold ≤ 255

Minimum increment: 1

Recommended increment: 5

Example (C)



If the parameter values are correct, the operator exhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMgExhaustiveMatchMg returns the value 2 (H_MSG_TRUE). If the input is empty (no input images are available) the behaviour can be set via 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>). If necessary, an exception is raised.

Possible Predecessors

draw_regiondraw_regionDrawRegionDrawRegionDrawRegion, draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1

Possible Successors

thresholdthresholdThresholdThresholdThreshold, local_maxlocal_maxLocalMaxLocalMaxLocalMax



See also