Change default tolerance level

Asked by Ruwan Pushpakumara

My understanding is that the default tolerance level of Sikuli for image comparison is 0.7. That means it does not check for exact matching. But for similar images. If we want to change the tolerance level to exact matching, that is 1, how can i do that. Please note that, i am using java for scripting.

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

as a general option:
Settings.MinSimilarity = 0.99;

for each find operation separately use Pattern instead of image:

find(image) -> find(new Pattern(image).similar(0.99))

with version 1.0.1+ you can use:
new Pattern(image).exact()

(with RC3 this usage is buggy)

Revision history for this message
Ruwan Pushpakumara (belikeharry) said :
#2

Thanks RaiMan, that solved my question.