Observing multiple events in 1.1.0

Asked by anatoly techtonik

Hi RaiMan.

Is it possible to observer multiple independent events (image/handler pairs) in Sikulix 1.1.0?
What is the performance impact?
Does OpenCV look for all images simultaneously or in turns?

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :

the basics:

please note the handler-less observe in background.

for one observe the events are checked sequentially one after the other, but you might setup some background observes in parallel with different region objects (might reference the same area on screen though and share the handler). Each background observe is run in a separate thread.

Revision history for this message
anatoly techtonik (techtonik) said :

Does it mean that if I have database of 1000 images, Sikuli will create 1000 threads and will take 1000 times longer to find at least one of them?

Revision history for this message
RaiMan (raimund-hocke) said :

if you delegate the background observe of each image to a different region, then you will create 1000 threads, that are processed in parallel.

having for example a 4 processor system, the elapsed time until completion of the last observe will be roughly 250 times the time of one individual search, since observing is very greedy on cpu time.
Finding at least one of them is the statistical mean value: 250/2 meaning 125.

So if you take 0.3 seconds for an individual search it will last on average about 40+ seconds, to find at least one.

You have to add the time to setup 1000 threads (no idea what that costs) and some other parallel processing overhead.

But if you tell me more about your intention, I could tell you more about possible ways to go with SikuliX.

Can you help with this problem?

Provide an answer of your own, or ask anatoly techtonik for more information if necessary.

To post a message you must log in.