locateOnScreen not matching
See original GitHub issuelocateOnScreen
is not matching, also tried the confidence
parameters that is mentioned in other issues like this one but is not working, also didn’t found that parameter in screenshotUtil.py file for this method.
These images are not matching for me, (just tested on windows):
any ideas what could be causing this problem?
also tried with grayscale
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Why PyAutoGui LocateOnScreen() only Returns None
The locateOnScreen() function returns None if the image wasn't found on the screen. Remember, the match has to be pixel-perfect in order to ......
Read more >Screenshot Functions - PyAutoGUI documentation
locateOnScreen (image, grayscale=False) - Returns (left, top, width, height) coordinate of first found instance of the image on the screen. Raises ...
Read more >Python 3.6.3 pyautogui.locateOnScreen not working
locateOnScreen not working. ... Matching, filtering and grouping in list comprehension ... locateOnScreen is returning None, even after 20 screenshots!
Read more >PyAutoGUI - Locate anything on your screen - YouTube
This is the second tutorial video on PyAutoGUI. In this tutorial I will teach you to locate anything on your screen using ...
Read more >Nearest match for images? : r/learnpython
locateOnScreen('image.png') that returns coordinates of exact match ... You could do an if not found, check confidence recursively lower.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you have openCV installed? If it is, pyautogui uses
pyscreeze._locateAll_opencv
and if openCV isn’t installed it usespyscreeze._locateAll_python
. I just tried both and the openCV one found the smaller image in the bigger one and the python one didn’t. I’m not knowledgeable enough about the inner workings to understand why it didn’t match it though. If you don’t have openCV installed, I’d suggest installing it and trying again. If you do have it installed, then I’m not sure why it works for me and not for you..locateAll_opencv
is the only one of the two that uses the confidence parameter and you have to look in pyscreeze to find it.@mogamepro, thank you for your help. that worked. I will close this issue