How to recognize exact picture

Asked by Mathias

Hello,

I was wondering how to make Sikuli recognize exact pictures.

Here's an example of my problem.

I want my script to click a blue dog.
But 50% of the time that dog is red instead of blue.
I've asked it to find a picture of the blue dog.
But when the red dog appears, Sikuli finds that even though I've asked it to find the blue dog.

Thanks regards

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

instead of

find("bluedog.png")

use

find(Pattern("bluedog.png").similar(0.95))

raise the value up to 0.99.

In all cases take care, that as little background is around the dog picture in your shot.

the setting of a Pattern can be done in IDE Preview as well.

Revision history for this message
Mathias (mathiasjrg) said :
#2

Thanks RaiMan, that solved my question.