Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for matchTemplate with transparency #1

Merged
merged 1 commit into from
May 31, 2020

Conversation

BrettMoan
Copy link
Owner

When using opencv as the locateall function, adds three additional keywords alpha and method, and hardedge

when alpha is set to true, method must be set to either cv2.TM_SQDIFF and cv2.TM_CCORR_NORMED, otherwise opencv will end up raising a "not implemented error"

additionally, hardedge can be set to False, to not "expand" the transparency. by default the image will be "crop" any alpha less than or equal to 128 to transparent, and any alpha above 128 will be considered non-transparent

When using opencv as the `locateall` function, adds three additional keywords `alpha` and `method`, and `hardedge`

when `alpha` is set to true, `method` must be set to either  cv2.TM_SQDIFF and cv2.TM_CCORR_NORMED, otherwise opencv will end up raising a "not implemented error"

additionally, `hardedge`  can be set to `False`, to not "expand" the transparency. by default the image will be "crop" any alpha less than or equal to 128 to transparent, and any alpha above 128 will be considered non-transparent
@BrettMoan BrettMoan merged commit 509201b into master May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant