← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #293475]: how to deal with visual differences between OS?

 

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

RaiMan proposed the following answer:
... with 1.1.0+

completeGUI = Image.create("completeShot.png")
someIcon1 = completeGUI.getSub(x1, y1, w1, h1)
someIcon2 = completeGUI.getSub(x2, y2, w2, h2)

match = exists(someIcon1, 0)
score = match.getScore()

now score is a float value with some more than 2 decimals.
so you might decide yourself, what you take as equal

Be aware:Tthe internally used OpenCV feature matchTemplate() does not
compare each pixel with each other, but uses some statistical summary
over the pixels in the rectangle finally leading to the match score.
Even in situations, where each pixel might be identical, the score will
not be exactly 1 but something like 0.9999999999....

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