|
|
@ -12,6 +12,7 @@ import org.opencv.core.Point; |
|
|
|
import org.opencv.core.Scalar; |
|
|
|
import org.opencv.core.Scalar; |
|
|
|
import org.opencv.core.DMatch; |
|
|
|
import org.opencv.core.DMatch; |
|
|
|
import org.opencv.features2d.DescriptorMatcher; |
|
|
|
import org.opencv.features2d.DescriptorMatcher; |
|
|
|
|
|
|
|
import org.opencv.features2d.FlannBasedMatcher; |
|
|
|
import org.opencv.core.KeyPoint; |
|
|
|
import org.opencv.core.KeyPoint; |
|
|
|
import org.opencv.test.OpenCVTestCase; |
|
|
|
import org.opencv.test.OpenCVTestCase; |
|
|
|
import org.opencv.test.OpenCVTestRunner; |
|
|
|
import org.opencv.test.OpenCVTestRunner; |
|
|
@ -168,6 +169,15 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase { |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// https://github.com/opencv/opencv/issues/11268
|
|
|
|
|
|
|
|
public void testConstructor() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
FlannBasedMatcher self_created_matcher = new FlannBasedMatcher(); |
|
|
|
|
|
|
|
Mat train = new Mat(1, 1, CvType.CV_8U, new Scalar(123)); |
|
|
|
|
|
|
|
self_created_matcher.add(Arrays.asList(train)); |
|
|
|
|
|
|
|
assertTrue(!self_created_matcher.empty()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void testAdd() { |
|
|
|
public void testAdd() { |
|
|
|
matcher.add(Arrays.asList(new Mat())); |
|
|
|
matcher.add(Arrays.asList(new Mat())); |
|
|
|
assertFalse(matcher.empty()); |
|
|
|
assertFalse(matcher.empty()); |
|
|
|