sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #42283
Re: [Question #623087]: Compare the current screen with a saved screenshot
Question #623087 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/623087
Status: Open => Answered
RaiMan proposed the following answer:
to solve this, you have to check with an image of the checked and the
unchecked situation against the checked and unchecked situation in the
screenshot.
use match.getScore() to get the score value of each case.
then use these values (it is ok, to round to 2 decimals) and
Pattern().similar() in the find ops.
depending on the concrete situation (scores), it might be necessary to
check again with the opposite after a match.
In SikuliX version 1.1.1 a score >0.99 means exact match (depending on the size of the search image, some pixels might be different though (usually around edges)).
So due to the usage of the underlying OpenCV feature matchTemplate(), a precision of a pixel cannot be achieved: a match score only signals a very, very, very, ... high probability that the image matches the nearer the score gets to 1.000000000000...
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.