Sikuli: Speed up recognition of absent image

java, python, sikuli

Solution

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

Problem

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) ```

Original source