Name
best_match_rot — Searching the best matching of a template and an image with rotation.
best_match_rot(Image : : TemplateID, AngleStart, AngleExtend, MaxError, SubPixel : Row, Column, Angle, Error)
The operator best_match_rot performs a matching of the template
of TemplateID and Image.
It works similar to best_match with the extension
that the pattern can be rotated.
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 best_match_rot
returns the rotion angle of the pattern in Angle (radiant).
The accuracy of this angle depends on the parameter AngleStep
of create_template_rot.
In the case of SubPixel = 'true' the position
and the angle are calculated with “sub pixel” accuracy.
|
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:
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
≤
255
|
|
Minimum increment:
1 |
|
Recommended increment:
3 |
|
SubPixel (input_control)
|
string → (string) |
| Subpixel accuracy in case of 'true'. |
|
Default value:
'false' |
|
List of values:
'true', 'false' |
|
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. |
If the parameter values are correct, the operator best_match_rot
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 is raised.
best_match_rot is reentrant and automatically parallelized (on tuple level).
create_template_rot,
read_template,
set_offset_template,
set_reference_template,
adapt_template,
draw_region,
draw_rectangle1,
reduce_domain
best_match_rot_mg
best_match,
best_match_mg
Matching
| Version 9.0.2 |
Copyright © 1996-2010 MVTec Software GmbH |