sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #58227
Re: [Question #701210]: Same image not found on different devices/systems
Question #701210 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/701210
Status: Open => Answered
RaiMan proposed the following answer:
No easy solution for this.
Since Java 11 getting the screen content is compatible for all screen setups (Windows, Mac, Linux) even for Retina/4K displays.
Eliminating the pixel-boost is done inside Java.
Resolution usually does not matter, as long as the display setup is run
with 100% scaling.
Background: to find an image on a screen (in fact an image shot of the screen), it must be visible with the same width and height.
SikuliX's resize feature might help in situations, where you know the scaling factor (e.g. 120%).
If we now look at different systems, then there are big differences, how
images might be rendered to the screen (compatible resolution and
scaling supposed). So even if the image might be visible with the same
width and height, the pixel content might differ substantially (which is
not always obvious for the user's eyes).
Basic recommendations:
- make the shots with the SikuliX IDE (given in your case)
- concentrate the shot to the parts that makes it unique (as little surrounding background as possible)
- avoid textual content in the shot (font rendering is the one, that brings the most differences)
In the end, there is no other solution, than to have image sets for
every system/screen setup, if the above mentioned measures do not work
sufficiently.
similarities below 0.7 but higher than 0.5 indeed are risky, but in
testing environments it might be possible, to make additional checks
(e.g. match position inside app window), but of course lead to more
effort.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.