Search code examples
pythoncomputer-visionpyautogui

"locateOnScreen()" is really slow


I have been using the following code from the pyautogui module:

locateOnScreen()

to locate image files. If you haven't seen the locateOnScreen() function before, this is how you use it:

location = pyautogui.locateOnScreen("Image", confidence = 0.3) # confidence is optional

The problem with using that is that it takes time to find the images. I was wondering if there is a way to make it work faster so the program can find more objects. There might not be a way, I was just wondering. Thank you!


Solution

  • I just needed to switch to openCV! Sorry for any issues with my dumb question!