Skip to content

matchTemplate difficult to find match #403

Open
@pkallos

Description

@pkallos

I think the change in #389 is incompatible with #163 's introduction of the .templateMatches function, which is useful.

In version 5.0.0 you can do the following:

var output = im.matchTemplate(templatePath, 3);
console.log(output.templateMatches(0.8, 1, 1));

and expect it to return the position of matches in the "probability" range 0.8-1.

Change in #389 introduces an output[0] Mat which appears to be normalized to a different range.

The new behavior for .matchTemplate appears to always return the coordinates to the "best match", but doesn't provide a mechanism for checking how closely the result should match the template.

In test cases where you checking a source image that doesn't contain the template image, it is now unclear to me how to check on the quality of the match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions