Template Matching ( IATemplateMatching )
Parameters:
Name |
Short Name |
Type |
Description |
Algorithm |
algorithmtype |
string |
Name of algorithm to be used for calculating match between template and image. |
Result |
resulttype |
string |
Name of results to be returned. |
Automatic Scaling |
autoscale |
boolean |
The template is scaled to the image based on x,y resolution data. If no, the scaling factor entered below is used. |
Scaling factor |
scalingfactor |
real |
The template is scaled by this number to match the x,y resolution of the image. Applicable if not using automatic scaling. Use 1 for no scaling. |
Working image size, exponent of 2 |
workingsize |
integer |
Images will be placed inside a 2^size quadrangular image, shrunken if required. No resizing if zero. Images sized as power of 2 are calculated faster. |
Template may hang out of image - N/A |
padimage |
boolean |
Pads the image to allow finding template partially out of the image. FUTURE FUNCTION. THIS IS NOT IMPLEMENTED |
Interpolation type |
interpolationtype |
string |
Interpolation used for the transformation. Affects the smoothness of the result. |
Transform all linked images |
allinkedimages |
boolean |
If yes not just Image A, but all linked images are transformed. Valid only if B is not linked. |
Multi frame matching |
multiframe |
string |
The way how image series are handled. |
Number of best matches to return |
nbestmatch |
integer |
Multiple, non-overlapping best matches will be returned as an image series, regardless the goodness of the correlation. |
Description:
Template Matching: finds a region of Image B that is the most similar to Image A.
Image A: template; Image B: the image where the match for the template is searched. The scaled x,y, size of the image must be bigger than the template.
The primary purpose of this function is to retrieve a matching region of a larger image (B) corresponding to the smaller image (template, A).Images of different magnification can be used. Images are scaled automatically according to image calibration, or by the "Scaling factor".
The best match is returned. The following results can be obtained:
"Image with ROI": The match is marked by an ROI in image B. The output is Image B.
"Cropped Image": The best match is scaled to the size of the template and returned as output as a new image. If "Transform all linked images" is selected, the same position in all linked channels is cropped, descaled and returned as new image windows linked to the output.
"Correlation Image": The output is a correlation image sized like Image A, where high pixel values mark centers of regions similar to the template.
The "Multi frame matching" parameter sets how image series of templates should behave. The "Repeated for all template frames" option results a ROI in B for each frame in A, or a cropped image series where each frame is the most similar part of image B, corresponding to each frame of A. For Image B always the actual frame is taken.
WARNING: Transforming all linked images is not parallel processing aware, so it requires proper pipeline design to prevent collision of this process with others. In such case use the "Wait for all inputs" function. To find multiple matches select "Correlation Image", and perform maximum search using image Segmentation, marking seeds.