sikuli 性能不够快

sikuli 性能不够快

问题描述:

我用 sikuli 编写了一个机器人程序并且运行良好.sikuli 这是完美的,但我找不到一种方法来更快地进行研究图像.看看这个:

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");} 

这会找到一个图像,但它不是很快,因为搜索图像和鼠标定位(或其他东西)之间的时间不是立即的,定位鼠标需要大约 1 秒或更少的时间.如果我需要即时点击和即时查找图像,有最好的方法吗?(我在 windows 8.1、java 15、sikuli 2.0.4 上工作)

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)

以下是一些提高图像查找速度的指南:

Here is some guidance to increase speed for image finding:

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

希望能帮到你