简体   繁体   中英

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. 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.

Vision.setParameter("MinTargetSize", 6)

I have only worked with Sikuli in the Sikuli IDE (so, take this answer as you will...)

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. 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. You can shorten the time by changing the ' seconds ' parameter:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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