Question on preciseness, time difference between two images

Asked by ManuCap31

Sikuli is capturing images every "x" seconds to process them. I would like to know "x", I mean the time between 2 images.
Is this constant? Or what would be the factors (size of image, objects, etc).
I'm working with 2K 2K monitors, I'm wondering how long it is.
Many thanks for your help.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

the relevant setting is
Settings.WaitScanRate

with a default value of 3, which means 3 searches per second with an updated screenshot

With large monitors (around 2Kx2K) the average search time with medium speed machines should be calculated with about 0.5 seconds (where about 2/3 internally is spent on the conversion of the screenshot (in memory BufferedImage) to an OpenCV Mat object (this is an annoyance and I will try to find a faster solution for that next year), which in turn is used to finally search the given (usually small) image)

So on large monitors you will have a situation with rather high cpu usage, when always searching on the whole screen, since Sikuli will be searching something in average (which internally is completely number crunching).

So the general recommendation with Sikuli workflows is to as often as possible try to search in restricted regions on the screen, which can be evaluated relative to known matches using the many available Sikuli features in class Region.

You might set the above mentioned value to higher values (more searches per second, only makes sense if you very often use small regions) or to lower values (<1 is possible) to slow down the repeated search (which saves cpu).

Revision history for this message
ManuCap31 (emmanuel-beau) said :
#2

Thanks RaiMan, that solved my question.