← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #240375]: MinSimilarity setting is implemented incorrectly?

 

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

RaiMan proposed the following answer:
I am just busy with moving the OpenCV related features (find, findAll, onChange, ...), the related Java classes like Finder and the functions implemented on the C++ level completely to the Java level, which is possible now, since OpenCV 2.4.5+ has the option to generate a Java OpenCV API layer and the performance is the same.
So I will revise this similarity handling anyway to be consistent all over the place.

current situation with 1.0.1:
- internally similarity score from OpenCV match is a float number and this is never 1.0 or 0.0 exactly.
- What you see with the highlight message is a rounded number (s>0.9950000000.... is 1.00 and 0.9850000000... < s <0.995 is 0.99)
- the way, how the MinSimilarity setting is used internally is different for find() and findAll()

Recommendation:
Never use MinSimilarity as 1.0, always use a value <1.0 (usually 0.99 for exact matches is sufficient - but feel free to try other values with more digits like 0.9999999).
The implementation of the Pattern class already assures this internally (exact() evaluates to 0.99).

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.