sikuli性能不够快。

huangapple go评论61阅读模式
英文:

sikuli performance is not fast enough

问题

我用Sikuli编写了一个机器人程序,运行得很好。
Sikuli非常出色,但我找不到一种更快速地进行图像搜索的方法。
看一下这个:

Screen s = new Screen();
if (s.exists("c:\\example\\ex.png") != null) {
    s.mouseMove("c:\\example\\ex.png");
}

这个代码用于查找图像,但因为在搜索图像和定位鼠标以进行点击(或其他操作)之间存在一定的时间延迟,所以并不是非常快,定位鼠标大约需要1秒或稍微少一些时间。
如果我需要即时点击和立即找到图像,有更好的方法吗?(我使用Windows 8.1,Java 15,Sikuli 2.0.4)

英文:

i writed a bot program with sikuli and working fine.
sikuli it's perfect but i can't find an way to doing reasearch image more faster.
look at this:

Screen s=new Screen();
  if (s.exists("c:\\example\\ex.png") != null) {s.mouseMove("c:\\example\\ex.png");} 

this find a image, BUT it's not a very fast because the time between search image and position mouse for click (or something else) it's not immediate, take about 1 or a bit less second for position mouse.
if i need istant click and istant find image, there is a best way? (i work on windows 8.1, java 15,sikuli 2.0.4)

答案1

得分: 1

以下是翻译好的内容:

这里有一些建议可以提高图像查找的速度:

  • Settings.MoveMouseDelay=0 - 这将消除移动鼠标时的默认延迟
  • 缩小搜索区域的大小。在您的示例中,您正在搜索整个屏幕
  • 通过更改 Settings.ObserveScanRate 来增加扫描速率。默认为每秒3次。

希望这些能有所帮助。

英文:

Here is some guidance to increase speed for image finding:

  • Settings.MoveMouseDelay=0 - this will remove default delay when moving mouse
  • Decrease region size where you are searching. Now in your example you are searching whole screen
  • Increase scan rate by changing Settings.ObserveScanRate. Default is 3 times per second.

Hope this helps

huangapple
  • 本文由 发表于 2020年9月23日 00:33:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/64014004.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定