← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #266981]: opencv match score isn't eqaul on android with Sikulix onPC

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
yes, this might well be ;-)

I did not touch the Vision C++ implementation since 2012.
Currently on Windows/Mac I think ;-) the library ...VisionProxy... is built with some OpenCV 2.4.x.

I have already implemented a Java only version using the OpenCV Java
API, but the latest tests with it are more than a year ago (it is
internally switched off).

The big difference against what you are doing on Android:
To gain speed, the search starts with base and probe image both scaled down to a ration, that is determined by the minimum size a probe must have (12 x 12 pixels in the standard).
If we get a match in this scaled down situation it is taken as success and the match coordinates are evaluated using the ratio, which might lead to rounding differences and other scores than with the actual size.
Furthermore internally (believe me it is a mess and thanks to the god of bits&bytes it works ;-) different Finder usages are not consistent.

In my Java only implementation I evaluate the final position and score,
by an additional matchTemplate in the calculated match area from the
scaled down situation with some additional few pixel margin.

... but I did not make any consequent tests until now.

conclusion: with SikuliX up to version 1.1.x you have to live with such
experiences (I will not touch any C++ code !).

... Version 2 will be better ;-)

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