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

locateAll may return overlapped boxes #123

Open
eight04 opened this issue Jun 11, 2024 · 1 comment
Open

locateAll may return overlapped boxes #123

eight04 opened this issue Jun 11, 2024 · 1 comment

Comments

@eight04
Copy link

eight04 commented Jun 11, 2024

https://stackoverflow.com/questions/68965801/pyautogui-locateall-returns-hundrets-of-similar-positions-when-theres-only-1-i
https://stackoverflow.com/questions/68042425/why-locate-all-on-screen-in-pyautogui-returns-multiple-similar-results

This should probably be documented.

@aentwist
Copy link

aentwist commented Sep 6, 2024

I created a lib that fully replaces PyScreeze for all things template matching, and there are various reasons to use it over PyScreeze for that. I'll let it speak for itself; try it out and see if you like it. Note that it does not include screenshot functionality (bring your own library that, or even use them side-by-side). https://github.com/aentwist/gamedriver

So to explain... I debugged this and OpenCV actually returns those duplicates. They must be deduplicated - it is about a 2-line fix.

See https://stackoverflow.com/questions/21829469/removing-or-preventing-duplicate-template-matches-in-opencv-with-python

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

No branches or pull requests

2 participants