Image recognition precision

Asked by Roberto Ruisánchez

I was making a script, and I found that one of the images I was looking for was mistakenly identified as another. I then selected the image in the IDE and found that I can define the precision of the recognition, so this kind of errors can be solved. But after changing the precision, when I try to run the script i get an error that reads "TypeError: similar(): expected 1 args; got 2". Is this an error?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Sergey Darovskih
Solved:
Last query:
Last reply:
Revision history for this message
Roberto Ruisánchez (ruisan) said :
#1

I found that the script now does not load the images and looks like this:
if find(Pattern("1264600350125.png").similar(0,97)):
   click(Pattern("1264600350125.png").similar(0,94))

If I change the value to 0.97 and 0.94, the script works, so the problems is the "," that is used by default.

I am using a Spanish windows XP.

Revision history for this message
Best Sergey Darovskih (darovskih) said :
#2

This bug is already known: https://bugs.launchpad.net/sikuli/+bug/511749. It is marked as "fixed", so we just have to wait next release.

Revision history for this message
Roberto Ruisánchez (ruisan) said :
#3

Thanks Sergey Darovskih, that solved my question.