Sikuli doesn't recognise images from other machines

Asked by Sahil Bhavsar on 2017-10-25

Suppose there are two machines with same resolution (say 1920x1080) and I want to click on one image e.g abc.png (snapshot taken from machine 2).

Sikuli Java Pseudo Code:

Screen s = new Screen();

if(s.exists(path_of_abc.png)){
s.click(path_of_abc.png)
}

On machine 1, this code will not able to recognise the region of abc.png because it's snapshot has been taken on machine 2.
Is this a normal behaviour? If not is there any possible way to make it happen?

I'm using sikulixapi (1.1.0) on 64 bit windows machine.

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2017-10-25
Last reply:
2017-10-25
RaiMan (raimund-hocke) said : #1

not a bug

RaiMan (raimund-hocke) said : #2

be sure, to have understood, how SikuliX works:
http://sikulix-2014.readthedocs.io/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen

If an image is not found by SikuliX, though you think you can see it on the screen, then usually in the actual environment there are differences at the pixel level, that are not obvious for your eyes, but lead to a match score less than 0.7 (in the standard).

The reason behind usually is a different behaviour of the rendering process and/or different fonts (if text is part of the image): anti-aliasing, background, edge-smoothing, ...

Take care, that the snapshot concentrates on the key aspects of the image with as little background as possible.
Find out, what the reasons are for the difference and correct if possible.

In doubt, you need a different set of images for each unique environment.

Can you help with this problem?

Provide an answer of your own, or ask Sahil Bhavsar for more information if necessary.

To post a message you must log in.