best_match_pre_mg ( ImagePyramid : : TemplateID, MaxError, SubPixel, NumLevels, WhichLevels : Row, Column, Error )
Searching the best grayvalue matches in a pre generated pyramid.
best_match_pre_mg applies gray value matching using an
image pyramid.
best_match_pre_mg works analogously to best_match_mg,
but it makes use of pre calculated pyramid which has to
be generated beforehand using gen_gauss_pyramid.
This reduces runtime if more than one match has to be done
or the pyramid has be used otherwise.
The pyramid has to be generated using the zooming factor 0.5
and the mode 'constant'.
Parameters
ImagePyramid (input_object)
|
image-array -> object : byte
|
|
Image pyramid inside of which the pattern has to
be found. |
TemplateID (input_control)
|
template -> integer
|
|
Template number. |
MaxError (input_control)
|
real -> real
|
|
Maximal average difference of the grayvalues. |
|
Default value: 30 |
|
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: 3
|
SubPixel (input_control)
|
string -> string
|
|
Exactness in subpixels 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 |
WhichLevels (input_control)
|
integer -> integer / string
|
|
Resolution level up to which the
method ``best match'' is used. |
|
Default value: 'original' |
|
Suggested values: 'all', 'original', 0, 1, 2, 3, 4, 5, 6 |
Row (output_control)
|
point.y -> real
|
|
Row position of the best match. |
Column (output_control)
|
point.x -> real
|
|
Column position of the best match. |
Error (output_control)
|
real -> real
|
|
Average divergence of the grayvalues in the
best match. |
Result
If the parameter values are correct, the operator best_match_pre_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_pre_mg is reentrant and automatically parallelized (on tuple level).
Possible Predecessors
gen_gauss_pyramid,
create_template,
read_template,
adapt_template,
draw_region,
draw_rectangle1,
reduce_domain,
set_reference_template
Alternatives
fast_match,
fast_match_mg,
exhaustive_match,
exhaustive_match_mg
Module
Template matching
Copyright © 1996-2005 MVTec Software GmbH