Preparing a pattern for template matching.
The operator create_template preprocesses a pattern, which is passed as an image, for the template matching. After the transformation, a number (TemplateID) is assigned to the template for being used in the further process.
If the pattern is no longer used, it has to be free by the operator delete_template in order to deallocate the memory.
Before the template, which is stored independently of the image size, can be applied it has to be adapted to the size of a definite image by using adapt_template.
Template (input_object) |
image -> object : byte |
Input image whose domain will be processed for the pattern matching. |
FirstError (input_control) |
integer -> integer |
Maximal difference of the first 32 grayvalues. | |
Default value: 5 | |
Suggested values: -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 15, 17, 20, 30 | |
Range of values: -1 <= FirstError <= 255 | |
Minimum increment: 1 | |
Recommended increment: 1 |
NumLevel (input_control) |
integer -> integer |
Maximal number of pyramid levels. | |
Default value: 4 | |
List of values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 |
Optimize (input_control) |
string -> string |
Kind of optimizing. | |
Default value: 'sort' | |
List of values: 'none', 'sort' |
GreyValues (input_control) |
string -> string |
Kind of grayvalues. | |
Default value: 'original' | |
List of values: 'original', 'gradient', 'sobel' |
TemplateID (output_control) |
integer -> integer |
Template number. | |
Default value: 0 |
If the number of the template is valid, the operator create_template returns the value TRUE. If necessary an exception will be raised.
adapt_template, delete_template