best_match_rotT_best_match_rotBestMatchRotBestMatchRotbest_match_rot (Operator)

Name

best_match_rotT_best_match_rotBestMatchRotBestMatchRotbest_match_rot — Searching the best matching of a template and an image with rotation.

Warning

best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot is obsolete and is only provided for reasons of backward compatibility. New applications should use the shape-based or NCC-based operators instead.

Signature

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

Herror T_best_match_rot(const Hobject Image, const Htuple TemplateID, const Htuple AngleStart, const Htuple AngleExtend, const Htuple MaxError, const Htuple SubPixel, Htuple* Row, Htuple* Column, Htuple* Angle, Htuple* Error)

void BestMatchRot(const HObject& Image, const HTuple& TemplateID, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& MaxError, const HTuple& SubPixel, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error)

void HTemplate::BestMatchRot(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error) const

void HTemplate::BestMatchRot(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, double* Row, double* Column, double* Angle, double* Error) const

void HTemplate::BestMatchRot(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const char* SubPixel, double* Row, double* Column, double* Angle, double* Error) const

void HTemplate::BestMatchRot(const HImage& Image, double AngleStart, double AngleExtend, double MaxError, const wchar_t* SubPixel, double* Row, double* Column, double* Angle, double* Error) const   (Windows only)

void HImage::BestMatchRot(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Error) const

void HImage::BestMatchRot(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const HString& SubPixel, double* Row, double* Column, double* Angle, double* Error) const

void HImage::BestMatchRot(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const char* SubPixel, double* Row, double* Column, double* Angle, double* Error) const

void HImage::BestMatchRot(const HTemplate& TemplateID, double AngleStart, double AngleExtend, double MaxError, const wchar_t* SubPixel, double* Row, double* Column, double* Angle, double* Error) const   (Windows only)

static void HOperatorSet.BestMatchRot(HObject image, HTuple templateID, HTuple angleStart, HTuple angleExtend, HTuple maxError, HTuple subPixel, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)

void HTemplate.BestMatchRot(HImage image, double angleStart, double angleExtend, double maxError, string subPixel, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)

void HTemplate.BestMatchRot(HImage image, double angleStart, double angleExtend, double maxError, string subPixel, out double row, out double column, out double angle, out double error)

void HImage.BestMatchRot(HTemplate templateID, double angleStart, double angleExtend, double maxError, string subPixel, out HTuple row, out HTuple column, out HTuple angle, out HTuple error)

void HImage.BestMatchRot(HTemplate templateID, double angleStart, double angleExtend, double maxError, string subPixel, out double row, out double column, out double angle, out double error)

def best_match_rot(image: HObject, template_id: HHandle, angle_start: float, angle_extend: float, max_error: float, sub_pixel: str) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def best_match_rot_s(image: HObject, template_id: HHandle, angle_start: float, angle_extend: float, max_error: float, sub_pixel: str) -> Tuple[float, float, float, float]

Description

The operator best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot performs a matching of the template of TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id and ImageImageImageImageimageimage. It works similar to best_matchbest_matchBestMatchBestMatchBestMatchbest_match with the extension that the pattern can be rotated. The parameters AngleStartAngleStartAngleStartAngleStartangleStartangle_start and AngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend define the maximum rotation of the pattern: AngleStartAngleStartAngleStartAngleStartangleStartangle_start specifies the maximum counter clockwise rotation and AngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend 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_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot). In addition to best_matchbest_matchBestMatchBestMatchBestMatchbest_match best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot returns the rotation angle of the pattern in AngleAngleAngleAngleangleangle (radiant). The accuracy of this angle depends on the parameter AngleStep of create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot. In the case of SubPixelSubPixelSubPixelSubPixelsubPixelsub_pixel = 'true'"true""true""true""true""true" the position and the angle are calculated with “sub pixel” accuracy.

Execution Information

Parameters

ImageImageImageImageimageimage (input_object)  singlechannelimage(-array) objectHImageHObjectHImageHobject (byte)

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

TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (input_control)  template HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Template number.

AngleStartAngleStartAngleStartAngleStartangleStartangle_start (input_control)  angle.rad HTuplefloatHTupleHtuple (real) (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

AngleExtendAngleExtendAngleExtendAngleExtendangleExtendangle_extend (input_control)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Maximum positive Extension of AngleStartAngleStartAngleStartAngleStartangleStartangle_start.

Default value: 0.79

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

Restriction: AngleExtend > 0

MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Maximum average difference of the gray values.

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 max_error ≤ 255

Minimum increment: 1

Recommended increment: 3

SubPixelSubPixelSubPixelSubPixelsubPixelsub_pixel (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (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"

RowRowRowRowrowrow (output_control)  point.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row position of the best match.

ColumnColumnColumnColumncolumncolumn (output_control)  point.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column position of the best match.

AngleAngleAngleAngleangleangle (output_control)  angle.rad(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Rotation angle of pattern.

ErrorErrorErrorErrorerrorerror (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Average divergence of the gray values of the best match.

Result

If the parameter values are correct, the operator best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot returns the value TRUE. If the input is empty (no input images are available) the behavior 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>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

create_template_rotcreate_template_rotCreateTemplateRotCreateTemplateRotCreateTemplateRotcreate_template_rot, read_templateread_templateReadTemplateReadTemplateReadTemplateread_template, set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template, set_reference_templateset_reference_templateSetReferenceTemplateSetReferenceTemplateSetReferenceTemplateset_reference_template, adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

Alternatives

best_match_rot_mgbest_match_rot_mgBestMatchRotMgBestMatchRotMgBestMatchRotMgbest_match_rot_mg

See also

best_matchbest_matchBestMatchBestMatchBestMatchbest_match, best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg

Module

Matching