← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #453689]: IDE changes script - similar(1.0) to exact() --- this is by intention and ok

 

Question #453689 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/453689

    Status: Open => Answered

RaiMan proposed the following answer:
up to version 1.1.1 exact() means that the score should be greater than
0.99 ( > 0.9900000000.... )

... and the same goes for similar(1.0).

In fact a match giving a score of 1.0 is not possible, since internally
the score value is a double real number between 0 and 1, that at the
surface is always rounded at some place right of the decimal point.

You might check this using Match.getScore().

To understand better, read this:
http://sikulix-2014.readthedocs.io/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen

In the versions of Sikuli before I took over with version 1.0.0, there were some inconsistencies in the handling of the wanted similarity score. 
Especially the internal handling with only 2 decimals made it impossible to differentiate between 2 very similar matches (score diff < 0.009).

But with version 1.1.1 the most inconsistencies have been fixed (except
the 2 decimals problem), so the symptom you have does not influence the
internal search.

With version 2 it will be possible, to define, what exact() should mean
in a special case and the number of decimals taken into account will be
raised to 5 or even more (not yet decided).

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.