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

Summary changed to:
opencv match score isn't eqaul on android with Sikulix onPC

Description changed to:
I tried to use opencv matchTemplate to repeat the result of Sikuli Finder.
The opencv version is 2.4.10 (OpenCV-2.4.10-android-sdk.zip).
And the code is

        Mat img = Highgui.imread("/data/local/tmp/dotahome.png",1);
        Mat img2 = Highgui.imread("/data/local/tmp/war.png",1);
        Mat res = new Mat();
        Imgproc.matchTemplate(img, img2, res, Imgproc.TM_CCOEFF_NORMED);
        Core.MinMaxLocResult m =  Core.minMaxLoc(res);
        Log.i(TAG, "maxVal = " + m.maxVal);
        Log.i(TAG, "maxLoc = " + m.maxLoc.x + "," + m.maxLoc.y);

and the output is
maxVal = 0.9522626996040344
maxLoc = 648.0,583.0

And the following codes is used in Sikulix version
2015-01-16_01:10nightly

f = Finder("dotahome.png")
f.find("war.png" )
if (f.hasNext()):
    m = f.next()
print m
print m.getScore()
print m.x, m.y

The result is
M[648,582 88x34]@S(S(0)[0,0 1920x1080]) S:0.92 C:692,599 [0/0 msec]
0.919825851917
648 582

The score and location are different between opencv on Android and Sikulix.
Would you please help on solving the difference?
Is the opencv usage the same as Sikulix's?
Thanks.

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to