best_match_rot_mg ( Image : : TemplateID, AngleStart, AngleExtend, MaxError, SubPixel, NumLevels : Row, Column, Angle, Error )
Searching the best matching of a template and a pyramid with rotation.
The operator best_match_rot_mg performs a matching of the template
of TemplateID and Image.
It works similar to best_match_mg with the extension
that the pattern can be rotated analogously to best_match_rot.
The parameters AngleStart and AngleExtend
define the maximum rotation of the pattern: AngleStart
specifies the maximum counter clockwise rotation and
AngleExtend 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_rot).
In addition to best_match_mg best_match_rot_mg
returns the rotion angle of the pattern in Angle (radiant).
The value of MaxError must be set larger in comparison with
the operator best_match_rot, because often the error is larger at
higher levels of the pyramid.
In the case of SubPixel = 'true' the position
and the angle are calculated with “sub pixel” accuracy.
The value of NumLevels has to equal or smaller than
the value used to create the template.
Parameters
Image (input_object)
|
image(-array) -> object : byte
|
|
Input image inside of which the pattern has to
be found. |
TemplateID (input_control)
|
template -> integer
|
|
Template number. |
AngleStart (input_control)
|
angle.rad -> real
|
|
Smallest Rotation of the pattern. |
|
Default value: -0.39 |
|
Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0 |
AngleExtend (input_control)
|
angle.rad -> real
|
|
Maximum positive Extension of AngleStart. |
|
Default value: 0.79 |
|
Suggested values: 6.28, 3.14, 1.57, 0.79, 0.39 |
|
Restriction: AngleExtend > 0 |
MaxError (input_control)
|
real -> real
|
|
Maximum average difference of the grayvalues. |
|
Default value: 40 |
|
Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 15, 17, 20, 30, 40, 50, 60, 70 |
|
Typical range of values: 0 <= MaxError <= 255 |
|
Minimum increment: 1
|
Recommended increment: 1
|
SubPixel (input_control)
|
string -> string
|
|
Subpixel accuracy in case of 'true'. |
|
Default value: 'false' |
|
List of values: 'true', 'false' |
NumLevels (input_control)
|
integer -> integer
|
|
Number of the used resolution levels. |
|
Default value: 3 |
|
List of values: 1, 2, 3, 4, 5, 6 |
Row (output_control)
|
point.y(-array) -> real
|
|
Row position of the best match. |
Column (output_control)
|
point.x(-array) -> real
|
|
Column position of the best match. |
Angle (output_control)
|
angle.rad(-array) -> real
|
|
Rotation angle of pattern. |
Error (output_control)
|
real(-array) -> real
|
|
Average divergence of the grayvalues of the
best match. |
Result
If the parameter values are correct, the operator best_match_rot_mg
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>).
If necessary, an exception handling is raised.
Parallelization Information
best_match_rot_mg is reentrant and automatically parallelized (on tuple level).
Possible Predecessors
create_template_rot,
set_reference_template,
set_offset_template,
adapt_template,
draw_region,
draw_rectangle1,
reduce_domain
Alternatives
best_match_rot,
best_match_mg
See also
fast_match
Module
Matching
Up: Matching/Gray-Value-Based Top: HALCON Operators
Copyright © 1996-2008 MVTec Software GmbH