Pattern match preview in IDE shows two different matches while "Exact" similarity is set

Asked by Alex Lunyov

I have a browser with two opened tabs of the same site. Each tab shows the same favicon of the site. But here is the difference. When the tab is not active the favicon background is slightly grayed. The logo itself is the same. But Sikuli's (1.1.1 2016-6-6) IDE match preview can't detect the difference even while the exact matching is set. It catches both favicons. Is there a solution to catch exact favicon with a clear white background?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Lunyov
Solved:
Last query:
Last reply:
Revision history for this message
Alex Lunyov (lunyov-av) said :
#1

According to matching algorithm the "exact" similarity is not the same as pixel-by-pixel similarity, am I right? So, is there any pixel-by-pixel comparison way?

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

in the current implementation "exact" means, that the score is > 0.99.

So if one match yields 0.991... and the other 0.992..., the both are "exact" in this sense.

A workaround is to evaluate the score yourself and make your decision:
m = exists(someImage)
print m. getScore()

Another option always is, to optimize the shot, so that it contains as little background as possible.

see:
http://sikulix-2014.readthedocs.io/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen

Revision history for this message
Alex Lunyov (lunyov-av) said :
#3

Thanks a lot for your suggestion!