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 c02b3bab29..e565b481d0 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,6 +19,8 @@ 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;
@@ -84,11 +86,19 @@ 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(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)
+ };
super.setUp();
}
@@ -179,6 +189,7 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
{
MatOfDMatch vdm = matches.get(i);
assertEquals(Math.min(k, train.total()), vdm.total());
+ Log.d("knn", "vdm["+i+"]="+vdm.dump());
for(DMatch dm : vdm.toArray())
{
assertEquals(dm.queryIdx, i);
diff --git a/modules/java/android_test/src/org/opencv/test/features2d/FASTFeatureDetectorTest.java b/modules/java/android_test/src/org/opencv/test/features2d/FASTFeatureDetectorTest.java
index d6cf9cdea1..6c1bd8376a 100644
--- a/modules/java/android_test/src/org/opencv/test/features2d/FASTFeatureDetectorTest.java
+++ b/modules/java/android_test/src/org/opencv/test/features2d/FASTFeatureDetectorTest.java
@@ -127,7 +127,7 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
detector.write(filename);
- String truth = "\n\n10\n1\n\n";
+ String truth = "\n\nFeature2D.FAST\n1\n10\n\n";
assertEquals(truth, readFile(filename));
}
@@ -136,7 +136,7 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
detector.write(filename);
- String truth = "%YAML:1.0\nthreshold: 10\nnonmaxSuppression: 1\n";
+ String truth = "%YAML:1.0\nname: \"Feature2D.FAST\"\nnonmaxSuppression: 1\nthreshold: 10\n";
assertEquals(truth, readFile(filename));
}
diff --git a/modules/java/android_test/src/org/opencv/test/features2d/FlannBasedDescriptorMatcherTest.java b/modules/java/android_test/src/org/opencv/test/features2d/FlannBasedDescriptorMatcherTest.java
index a261c5b2a4..bbb08f331f 100644
--- a/modules/java/android_test/src/org/opencv/test/features2d/FlannBasedDescriptorMatcherTest.java
+++ b/modules/java/android_test/src/org/opencv/test/features2d/FlannBasedDescriptorMatcherTest.java
@@ -191,11 +191,19 @@ public class FlannBasedDescriptorMatcherTest 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(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)
+ };
super.setUp();
}
@@ -368,10 +376,16 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
matcher.match(query, train, matches);
assertArrayDMatchEquals(new DMatch[]{
+ /*
new DMatch(0, 0, 0, 0),
new DMatch(1, 2, 0, 0),
new DMatch(2, 1, 0, 0),
- new DMatch(3, 3, 0, 0)}, matches.toArray(), EPS);
+ new DMatch(3, 3, 0, 0)
+ */
+ new DMatch(1, 2, 0, 42),
+ new DMatch(2, 1, 0, 40),
+ new DMatch(3, 3, 0, 53)
+ }, matches.toArray(), EPS);
}
public void testTrain() {
diff --git a/modules/java/android_test/src/org/opencv/test/features2d/ORBDescriptorExtractorTest.java b/modules/java/android_test/src/org/opencv/test/features2d/ORBDescriptorExtractorTest.java
index 5f9874ec78..5bd64d0247 100644
--- a/modules/java/android_test/src/org/opencv/test/features2d/ORBDescriptorExtractorTest.java
+++ b/modules/java/android_test/src/org/opencv/test/features2d/ORBDescriptorExtractorTest.java
@@ -46,8 +46,8 @@ public class ORBDescriptorExtractorTest extends OpenCVTestCase {
Mat truth = new Mat(1, 32, CvType.CV_8UC1) {
{
- put(0, 0, 20, 51, 88, 22, 14, 181, 78, 111, 36, 144, 62, 0, 188, 196, 4, 8, 133, 80, 96, 18, 64, 29, 0,
- 254, 230, 247, 12, 2, 78, 129, 70, 145);
+ put(0, 0,
+ 6, 74, 6, 129, 2, 130, 56, 0, 36, 132, 66, 165, 172, 6, 3, 72, 102, 61, 163, 214, 0, 144, 65, 232, 4, 32, 138, 129, 4, 21, 37, 88);
}
};
assertMatEqual(truth, descriptors);
@@ -83,8 +83,8 @@ public class ORBDescriptorExtractorTest extends OpenCVTestCase {
Mat truth = new Mat(1, 32, CvType.CV_8UC1) {
{
- put(0, 0, 20, 55, 88, 20, 14, 49, 70, 111, 148, 144, 30, 16, 252, 133, 0, 8, 5, 85, 32, 0, 74, 25, 0,
- 252, 119, 191, 4, 2, 66, 1, 66, 145);
+ put(0, 0,
+ 6, 10, 22, 5, 2, 130, 56, 0, 44, 164, 66, 165, 140, 6, 1, 72, 38, 61, 163, 210, 0, 208, 1, 104, 4, 32, 10, 131, 0, 37, 37, 67);
}
};
assertMatEqual(truth, descriptors);
@@ -95,7 +95,7 @@ public class ORBDescriptorExtractorTest extends OpenCVTestCase {
extractor.write(filename);
- String truth = "\n\n1.2000000476837158e+00\n3\n0\n31\n31\n\n";
+ String truth = "\n\nFeature2D.ORB\n2\n31\n0\n500\n8\n31\n1.2000000476837158e+00\n0\n\n";
assertEquals(truth, readFile(filename));
}
@@ -104,7 +104,7 @@ public class ORBDescriptorExtractorTest extends OpenCVTestCase {
extractor.write(filename);
- String truth = "%YAML:1.0\nscaleFactor: 1.2000000476837158e+00\nnLevels: 3\nfirstLevel: 0\nedgeThreshold: 31\npatchSize: 31\n";
+ String truth = "%YAML:1.0\nname: \"Feature2D.ORB\"\nWTA_K: 2\nedgeThreshold: 31\nfirstLevel: 0\nnFeatures: 500\nnLevels: 8\npatchSize: 31\nscaleFactor: 1.2000000476837158e+00\nscoreType: 0\n";
assertEquals(truth, readFile(filename));
}
diff --git a/modules/java/android_test/src/org/opencv/test/video/BackgroundSubtractorMOGTest.java b/modules/java/android_test/src/org/opencv/test/video/BackgroundSubtractorMOGTest.java
index 01d5221ede..198d06508f 100644
--- a/modules/java/android_test/src/org/opencv/test/video/BackgroundSubtractorMOGTest.java
+++ b/modules/java/android_test/src/org/opencv/test/video/BackgroundSubtractorMOGTest.java
@@ -1,13 +1,6 @@
package org.opencv.test.video;
-import org.opencv.core.Core;
-import org.opencv.core.CvType;
-import org.opencv.core.Mat;
-import org.opencv.core.Point;
-import org.opencv.core.Scalar;
-import org.opencv.highgui.Highgui;
import org.opencv.test.OpenCVTestCase;
-import org.opencv.video.BackgroundSubtractorMOG;
public class BackgroundSubtractorMOGTest extends OpenCVTestCase {