简体   繁体   English

“locateOnScreen()”真的很慢

[英]“locateOnScreen()” is really slow

I have been using the following code from the pyautogui module: 我一直在使用pyautogui模块中的以下代码:

locateOnScreen()

to locate image files. 找到图像文件。 If you haven't seen the locateOnScreen() function before, this is how you use it: 如果您之前没有看过locateOnScreen()函数,这就是您使用它的方式:

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! 谢谢!

I just needed to switch to openCV! 我只需要切换到openCV! Sorry for any issues with my dumb question! 对不起我的愚蠢问题的任何问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM