HALCON Reference Manual 10.0.2
Table of Contents / Matching / Gray-Value-Based ClassesClassesClasses | | | Operators

fast_match_mgfast_match_mgfast_match_mgFastMatchMgFastMatchMg (Operator)

Name

fast_match_mgfast_match_mgfast_match_mgFastMatchMgFastMatchMg — Searching all good grayvalue matches in a pyramid.

Signature

fast_match_mg(Image : Matches : TemplateID, MaxError, NumLevel : )

Herror fast_match_mg(const Hobject Image, Hobject* Matches, const Hlong TemplateID, double MaxError, const Hlong NumLevel)

Herror T_fast_match_mg(const Hobject Image, Hobject* Matches, const Htuple TemplateID, const Htuple MaxError, const Htuple NumLevel)

Herror fast_match_mg(Hobject Image, Hobject* Matches, const HTuple& TemplateID, const HTuple& MaxError, const HTuple& NumLevel)

HRegion HImage::FastMatchMg(const HTemplate& TemplateID, const HTuple& MaxError, const HTuple& NumLevel) const

HRegionArray HImageArray::FastMatchMg(const HTemplate& TemplateID, const HTuple& MaxError, const HTuple& NumLevel) const

HRegionArray HTemplate::FastMatchMg(const HImageArray& Image, const HTuple& MaxError, const HTuple& NumLevel) const

void HOperatorSetX.FastMatchMg(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*Matches, [in] VARIANT TemplateID, [in] VARIANT MaxError, [in] VARIANT NumLevel)

IHRegionX* HTemplateX.FastMatchMg(
[in] IHImageX* Image, [in] double MaxError, [in] VARIANT NumLevel)

IHRegionX* HImageX.FastMatchMg(
[in] IHTemplateX* TemplateID, [in] double MaxError, [in] VARIANT NumLevel)

static void HOperatorSet.FastMatchMg(HObject image, out HObject matches, HTuple templateID, HTuple maxError, HTuple numLevel)

HRegion HTemplate.FastMatchMg(HImage image, double maxError, HTuple numLevel)

HRegion HTemplate.FastMatchMg(HImage image, double maxError, int numLevel)

HRegion HImage.FastMatchMg(HTemplate templateID, double maxError, HTuple numLevel)

HRegion HImage.FastMatchMg(HTemplate templateID, double maxError, int numLevel)

Description

The operator fast_match_mgfast_match_mgfast_match_mgFastMatchMgFastMatchMg like the operator fast_matchfast_matchfast_matchFastMatchFastMatch performs a matching of the template of TemplateIDTemplateIDTemplateIDTemplateIDtemplateID and ImageImageImageImageimage. In contrast to fast_matchfast_matchfast_matchFastMatchFastMatch, however, the search for good matches starts in scaled down images (pyramid). The number of levels of the pyramid will be determined by NumLevelNumLevelNumLevelNumLevelnumLevel. Hereby the value 1 indicates that no pyramid will be used. In this case the operator fast_match_mgfast_match_mgfast_match_mgFastMatchMgFastMatchMg is equivalent to the operator fast_matchfast_matchfast_matchFastMatchFastMatch. The value 2 triggers the search in the image with half the framesize. The search for all those points showing an error small enough in the scaled down image (error smaller than MaxErrorMaxErrorMaxErrorMaxErrormaxError) will be refined at the corresponding positions in the original image (ImageImageImageImageimage).

The runtime of matching dependends on the parameter MaxErrorMaxErrorMaxErrorMaxErrormaxError: the larger the value the longer is the processing time, because more points of the pattern have to be tested. If MaxErrorMaxErrorMaxErrorMaxErrormaxError is to low the pattern will not be found. The value has therefore to be optimized for every application.

NumLevelNumLevelNumLevelNumLevelnumLevel indicates the number of levels of the pyramid, including the original image. Optionally a second value can be given. This value specifies the number (0..n) of the lowest level which is used the matching. The region found up to this level will then be zoomed to the size of the original level. This can used to increase the runtime in the case that the accuracy does not have to be so high.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image(-array) objectHImageHImageHImageXHobject (byte)

Input image inside of which the pattern has to be found.

MatchesMatchesMatchesMatchesmatches (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

All points which have an error below a certain threshold.

TemplateIDTemplateIDTemplateIDTemplateIDtemplateID (input_control)  template HTemplate, HTupleHTemplate, HTupleHTemplateX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Template number.

MaxErrorMaxErrorMaxErrorMaxErrormaxError (input_control)  real HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Maximal average difference of the grayvalues.

Default value: 30.0

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

Typical range of values: 0 ≤ MaxError MaxError MaxError MaxError maxError ≤ 255

Minimum increment: 1

Recommended increment: 3

NumLevelNumLevelNumLevelNumLevelnumLevel (input_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of levels in the pyramid.

Default value: 3

List of values: 1, 2, 3, 4, 5, 6, 7, 8

Result

If the parameter values are correct, the operator fast_match_mgfast_match_mgfast_match_mgFastMatchMgFastMatchMg 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

create_templatecreate_templatecreate_templateCreateTemplateCreateTemplate, read_templateread_templateread_templateReadTemplateReadTemplate, adapt_templateadapt_templateadapt_templateAdaptTemplateAdaptTemplate, draw_regiondraw_regiondraw_regionDrawRegionDrawRegion, draw_rectangle1draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1, reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain

Alternatives

best_matchbest_matchbest_matchBestMatchBestMatch, best_match_mgbest_match_mgbest_match_mgBestMatchMgBestMatchMg, fast_matchfast_matchfast_matchFastMatchFastMatch, exhaustive_matchexhaustive_matchexhaustive_matchExhaustiveMatchExhaustiveMatch, exhaustive_match_mgexhaustive_match_mgexhaustive_match_mgExhaustiveMatchMgExhaustiveMatchMg

Module

Matching


Table of Contents / Matching / Gray-Value-Based ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH