ClassesClassesClassesClasses | | | | Operators

best_match_rot_mgbest_match_rot_mgBestMatchRotMgbest_match_rot_mgBestMatchRotMgBestMatchRotMg (Operator)

Name

best_match_rot_mgbest_match_rot_mgBestMatchRotMgbest_match_rot_mgBestMatchRotMgBestMatchRotMg — Searching the best matching of a template and a pyramid with rotation.

Signature

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

Herror best_match_rot_mg(const Hobject Image, const Hlong TemplateID, double AngleStart, double AngleExtend, double MaxError, const char* SubPixel, const Hlong NumLevels, double* Row, double* Column, double* Angle, double* 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)

Herror best_match_rot_mg(Hobject Image, const HTuple& TemplateID, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& MaxError, const HTuple& SubPixel, const HTuple& NumLevels, double* Row, double* Column, double* Angle, double* Error)

Herror best_match_rot_mg(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)

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

HTuple HImageArray::BestMatchRotMg(const HTemplate& TemplateID, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& MaxError, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Column, HTuple* Angle, HTuple* Error) const

HTuple HTemplate::BestMatchRotMg(const HImageArray& Image, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& MaxError, const HTuple& SubPixel, const HTuple& NumLevels, HTuple* Column, HTuple* Angle, HTuple* Error) const

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 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 HOperatorSetX.BestMatchRotMg(
[in] IHUntypedObjectX* Image, [in] VARIANT TemplateID, [in] VARIANT AngleStart, [in] VARIANT AngleExtend, [in] VARIANT MaxError, [in] VARIANT SubPixel, [in] VARIANT NumLevels, [out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* Angle, [out] VARIANT* Error)

VARIANT HTemplateX.BestMatchRotMg(
[in] IHImageX* Image, [in] double AngleStart, [in] double AngleExtend, [in] double MaxError, [in] BSTR SubPixel, [in] Hlong NumLevels, [out] VARIANT* Column, [out] VARIANT* Angle, [out] VARIANT* Error)

VARIANT HImageX.BestMatchRotMg(
[in] IHTemplateX* TemplateID, [in] double AngleStart, [in] double AngleExtend, [in] double MaxError, [in] BSTR SubPixel, [in] Hlong NumLevels, [out] VARIANT* Column, [out] VARIANT* Angle, [out] VARIANT* Error)

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)

Description

The operator best_match_rot_mgbest_match_rot_mgBestMatchRotMgbest_match_rot_mgBestMatchRotMgBestMatchRotMg performs a matching of the template of TemplateIDTemplateIDTemplateIDTemplateIDTemplateIDtemplateID and ImageImageImageImageImageimage. It works similar to best_match_mgbest_match_mgBestMatchMgbest_match_mgBestMatchMgBestMatchMg with the extension that the pattern can be rotated analogously to best_match_rotbest_match_rotBestMatchRotbest_match_rotBestMatchRotBestMatchRot. The parameters AngleStartAngleStartAngleStartAngleStartAngleStartangleStart and AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend define the maximum rotation of the pattern: AngleStartAngleStartAngleStartAngleStartAngleStartangleStart specifies the maximum counter clockwise rotation and AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend the maximum clockwise rotation relative to this angle. Both values have to smaller or equal to the values used for the creation of the pattern (see create_template_rotcreate_template_rotCreateTemplateRotcreate_template_rotCreateTemplateRotCreateTemplateRot). In addition to best_match_mgbest_match_mgBestMatchMgbest_match_mgBestMatchMgBestMatchMg best_match_rot_mgbest_match_rot_mgBestMatchRotMgbest_match_rot_mgBestMatchRotMgBestMatchRotMg returns the rotion angle of the pattern in AngleAngleAngleAngleAngleangle (radiant).

The value of MaxErrorMaxErrorMaxErrorMaxErrorMaxErrormaxError must be set larger in comparison with the operator best_match_rotbest_match_rotBestMatchRotbest_match_rotBestMatchRotBestMatchRot, because often the error is larger at higher levels of the pyramid.

In the case of SubPixelSubPixelSubPixelSubPixelSubPixelsubPixel = 'true'"true""true""true""true""true" the position and the angle are calculated with “sub pixel” accuracy.

The value of NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels has to equal or smaller than the value used to create the template.

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  singlechannelimage(-array) objectHImageHImageHImageHImageXHobject (byte)

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

TemplateIDTemplateIDTemplateIDTemplateIDTemplateIDtemplateID (input_control)  template HTemplate, HTupleHTupleHTemplate, HTupleHTemplateX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Template number.

AngleStartAngleStartAngleStartAngleStartAngleStartangleStart (input_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Smallest Rotation of the pattern.

Default value: -0.39

Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0

AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend (input_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Maximum positive Extension of AngleStartAngleStartAngleStartAngleStartAngleStartangleStart.

Default value: 0.79

Suggested values: 6.28, 3.14, 1.57, 0.79, 0.39

Restriction: AngleExtend > 0

MaxErrorMaxErrorMaxErrorMaxErrorMaxErrormaxError (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Maximum average difference of the grayvalues.

Default value: 40.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 maxError ≤ 255

Minimum increment: 1

Recommended increment: 1

SubPixelSubPixelSubPixelSubPixelSubPixelsubPixel (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Subpixel accuracy in case of 'true'"true""true""true""true""true".

Default value: 'false' "false" "false" "false" "false" "false"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of the used resolution levels.

Default value: 3

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

RowRowRowRowRowrow (output_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Row position of the best match.

ColumnColumnColumnColumnColumncolumn (output_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Column position of the best match.

AngleAngleAngleAngleAngleangle (output_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Rotation angle of pattern.

ErrorErrorErrorErrorErrorerror (output_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Average divergence of the grayvalues of the best match.

Result

If the parameter values are correct, the operator best_match_rot_mgbest_match_rot_mgBestMatchRotMgbest_match_rot_mgBestMatchRotMgBestMatchRotMg 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>)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_template_rotcreate_template_rotCreateTemplateRotcreate_template_rotCreateTemplateRotCreateTemplateRot, set_reference_templateset_reference_templateSetReferenceTemplateset_reference_templateSetReferenceTemplateSetReferenceTemplate, set_offset_templateset_offset_templateSetOffsetTemplateset_offset_templateSetOffsetTemplateSetOffsetTemplate, adapt_templateadapt_templateAdaptTemplateadapt_templateAdaptTemplateAdaptTemplate, draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion, draw_rectangle1draw_rectangle1DrawRectangle1draw_rectangle1DrawRectangle1DrawRectangle1, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain

Alternatives

best_match_rotbest_match_rotBestMatchRotbest_match_rotBestMatchRotBestMatchRot, best_match_mgbest_match_mgBestMatchMgbest_match_mgBestMatchMgBestMatchMg

See also

fast_matchfast_matchFastMatchfast_matchFastMatchFastMatch

Module

Matching


ClassesClassesClassesClasses | | | | Operators