简体   繁体   English

Sikuli:加快对缺席图像的识别

[英]Sikuli: Speed up recognition of absent image

Finding a present image seems to work pretty fast, however, when the image is absent, sikuli takes a long time before it declared the image not found. 查找当前图像似乎工作得非常快,但是,当图像不存在时,sikuli在声明未找到图像之前需要很长时间。 Is it possible to speed up this process? 有可能加快这个过程吗? I already minimized the image size and search region. 我已经最小化了图像大小和搜索区域。 I tried setting minTargetSize parameter, but it doesn't seem to have much effect. 我尝试设置minTargetSize参数,但似乎没有太大影响。

Vision.setParameter("MinTargetSize", 6)

I have only worked with Sikuli in the Sikuli IDE (so, take this answer as you will...) 我只在Sikuli IDE中与Sikuli合作过(所以,请按照你的意思选择这个答案......)

There is a region.setAutoWaitTimeout( seconds ) that can be used to define how long Sikuli will "look" for an image before declaring that it is not there. 有一个region.setAutoWaitTimeout( )可用于定义Sikuli在声明它不存在之前将“查看”图像多长时间。 The default is 3.0 seconds--which is why it takes an entire 3 seconds to move on after looking for an image that is not present. 默认值为3.0秒 - 这就是为什么在查找不存在的图像后需要整整3秒的时间才能继续。 You can shorten the time by changing the ' seconds ' parameter: 您可以通过更改' seconds '参数来缩短时间:

myRegion.setAutoWaitTimeout(1) myRegion.setAutoWaitTimeout(1)

This will allow Sikuli to move on (or throw a FindFailed exception) after 1 second instead of 3. setAutoWaitTimeout() is documented here 这将允许Sikuli在1秒后移动(或抛出FindFailed异常)而不是3. 此处记录 setAutoWaitTimeout()

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

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