From: Andrey Kamaev Date: Wed, 25 Apr 2012 16:03:01 +0000 (+0000) Subject: Fixed SURF behavior - from now it always returns keypoints in the same order X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~1994 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db3f9b139bd4a1b2b6ce636cc9427153a6b4f2e4;p=platform%2Fupstream%2Fopencv.git Fixed SURF behavior - from now it always returns keypoints in the same order --- diff --git a/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java b/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java index 821c9a4..342328e 100644 --- a/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java +++ b/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java @@ -19,8 +19,6 @@ import org.opencv.features2d.KeyPoint; import org.opencv.test.OpenCVTestCase; import org.opencv.test.OpenCVTestRunner; -import android.util.Log; - public class BruteForceDescriptorMatcherTest extends OpenCVTestCase { DescriptorMatcher matcher; @@ -86,18 +84,11 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase { matSize = 100; truth = new DMatch[] { - /* - new DMatch(0, 0, 0, 0.643284f), - new DMatch(1, 1, 0, 0.92945856f), - new DMatch(2, 1, 0, 0.2841479f), - new DMatch(3, 1, 0, 0.9194034f), - new DMatch(4, 1, 0, 0.3006621f) - */ - new DMatch(0, 0, 0, 1.049694f), - new DMatch(1, 0, 0, 1.083795f), - new DMatch(2, 1, 0, 0.484352f), - new DMatch(3, 0, 0, 1.098605f), - new DMatch(4, 1, 0, 0.494587f) + new DMatch(0, 0, 0, 1.049694f), + new DMatch(1, 0, 0, 1.098605f), + new DMatch(2, 1, 0, 0.494587f), + new DMatch(3, 1, 0, 0.484352f), + new DMatch(4, 0, 0, 1.083795f) }; super.setUp(); @@ -180,9 +171,10 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase { Mat query = getQueryDescriptors(); List matches = new ArrayList(); matcher.knnMatch(query, train, matches, k); + /* Log.d("knnMatch", "train = " + train); Log.d("knnMatch", "query = " + query); - /* + matcher.add(train); matcher.knnMatch(query, matches, k); */ @@ -190,7 +182,7 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase { for(int i = 0; i