Java API: fixed problems in video and ml modules; generated test stubs for all exported functions (now we have 1701 tests).
This commit is contained in:
parent
9b1cb7227a
commit
a0590273e9
@ -1707,7 +1707,7 @@ status(" Documentation:")
|
||||
status(" Sphinx:" HAVE_SPHINX THEN "${SPHINX_BUILD} (ver ${SPHINX_VERSION})" ELSE NO)
|
||||
status(" PdfLaTeX compiler:" PDFLATEX_COMPILER THEN "${PDFLATEX_COMPILER}" ELSE NO)
|
||||
if (BUILD_DOCS AND HAVE_SPHINX)
|
||||
status(" Build Documentation:" PDFLATEX_COMPILER THEN YES ELSE "YES (HTML only)")
|
||||
status(" Build Documentation:" PDFLATEX_COMPILER THEN YES ELSE "YES (only HTML without math formulas)")
|
||||
else()
|
||||
status(" Build Documentation:" NO)
|
||||
endif()
|
||||
|
@ -1,15 +1,5 @@
|
||||
package org.opencv.test;
|
||||
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Rect;
|
||||
import org.opencv.core.Scalar;
|
||||
import org.opencv.features2d.DMatch;
|
||||
import org.opencv.features2d.KeyPoint;
|
||||
import org.opencv.highgui.Highgui;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
@ -21,6 +11,16 @@ import java.util.List;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Rect;
|
||||
import org.opencv.core.Scalar;
|
||||
import org.opencv.features2d.DMatch;
|
||||
import org.opencv.features2d.KeyPoint;
|
||||
import org.opencv.highgui.Highgui;
|
||||
|
||||
public class OpenCVTestCase extends TestCase {
|
||||
|
||||
protected static int matSize = 10;
|
||||
@ -167,24 +167,30 @@ public class OpenCVTestCase extends TestCase {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public static void assertListIntegerEquals(List<Integer> list1, List<Integer> list2) {
|
||||
public static <E extends Number> void assertListEquals(List<E> list1, List<E> list2) {
|
||||
if (list1.size() != list2.size()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
if (!list1.isEmpty())
|
||||
{
|
||||
if (list1.get(0) instanceof Float || list1.get(0) instanceof Double)
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
for (int i = 0; i < list1.size(); i++)
|
||||
assertEquals(list1.get(i), list2.get(i));
|
||||
}
|
||||
|
||||
public static void assertListFloatEquals(List<Float> list1, List<Float> list2, double epsilon) {
|
||||
|
||||
public static <E extends Number> void assertListEquals(List<E> list1, List<E> list2, double epsilon) {
|
||||
if (list1.size() != list2.size()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < list1.size(); i++)
|
||||
assertTrue(Math.abs(list1.get(i) - list2.get(i)) <= epsilon);
|
||||
assertTrue(Math.abs(list1.get(i).doubleValue() - list2.get(i).doubleValue()) <= epsilon);
|
||||
}
|
||||
|
||||
|
||||
public static void assertListMatEquals(List<Mat> list1, List<Mat> list2, double epsilon) {
|
||||
if (list1.size() != list2.size()) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
@ -0,0 +1,23 @@
|
||||
package org.opencv.test.android;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class UtilsTest extends OpenCVTestCase {
|
||||
|
||||
public void testBitmapToMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testExportResourceContextInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testExportResourceContextIntString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatToBitmap() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -13,11 +13,7 @@ import org.opencv.core.Scalar;
|
||||
import org.opencv.core.Size;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class calib3dTest extends OpenCVTestCase {
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("calib3d");
|
||||
}
|
||||
public class Calib3dTest extends OpenCVTestCase {
|
||||
|
||||
public void testCalibrateCameraListOfMatListOfMatSizeMatMatListOfMatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
@ -238,7 +234,7 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
assertEquals(CvType.CV_32FC2, centers.type());
|
||||
}
|
||||
|
||||
public void testFindFundamentalMatMatMat() {
|
||||
public void testFindFundamentalMatListOfPointListOfPoint() {
|
||||
List<Point> pts1 = new ArrayList<Point>();
|
||||
List<Point> pts2 = new ArrayList<Point>();
|
||||
|
||||
@ -257,24 +253,23 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth, fm, EPS);
|
||||
}
|
||||
|
||||
public void testFindFundamentalMatMatMatInt() {
|
||||
public void testFindFundamentalMatListOfPointListOfPointInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFindFundamentalMatMatMatIntDouble() {
|
||||
public void testFindFundamentalMatListOfPointListOfPointIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFindFundamentalMatMatMatIntDoubleDouble() {
|
||||
public void testFindFundamentalMatListOfPointListOfPointIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFindFundamentalMatMatMatIntDoubleDoubleMat() {
|
||||
public void testFindFundamentalMatListOfPointListOfPointIntDoubleDoubleMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFindHomographyMatMat() {
|
||||
|
||||
public void testFindHomographyListOfPointListOfPoint() {
|
||||
List<Point> originalPoints = new ArrayList<Point>();
|
||||
List<Point> transformedPoints = new ArrayList<Point>();
|
||||
|
||||
@ -293,15 +288,15 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth, hmg, EPS);
|
||||
}
|
||||
|
||||
public void testFindHomographyMatMatInt() {
|
||||
public void testFindHomographyListOfPointListOfPointInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFindHomographyMatMatIntDouble() {
|
||||
public void testFindHomographyListOfPointListOfPointIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFindHomographyMatMatIntDoubleMat() {
|
||||
public void testFindHomographyListOfPointListOfPointIntDoubleMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
@ -495,7 +490,7 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSolvePnPMatMatMatMatMatMat() {
|
||||
public void testSolvePnPListOfPoint3ListOfPointMatMatMatMat() {
|
||||
Mat intrinsics = Mat.eye(3, 3, CvType.CV_32F);
|
||||
intrinsics.put(0, 0, 400);
|
||||
intrinsics.put(1, 1, 400);
|
||||
@ -527,31 +522,31 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth_tvec, tvec, EPS);
|
||||
}
|
||||
|
||||
public void testSolvePnPMatMatMatMatMatMatBoolean() {
|
||||
public void testSolvePnPListOfPoint3ListOfPointMatMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSolvePnPRansacMatMatMatMatMatMat() {
|
||||
public void testSolvePnPRansacListOfPoint3ListOfPointMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSolvePnPRansacMatMatMatMatMatMatBoolean() {
|
||||
public void testSolvePnPRansacListOfPoint3ListOfPointMatMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSolvePnPRansacMatMatMatMatMatMatBooleanInt() {
|
||||
public void testSolvePnPRansacListOfPoint3ListOfPointMatMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSolvePnPRansacMatMatMatMatMatMatBooleanIntFloat() {
|
||||
public void testSolvePnPRansacListOfPoint3ListOfPointMatMatMatMatBooleanIntFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSolvePnPRansacMatMatMatMatMatMatBooleanIntFloatInt() {
|
||||
public void testSolvePnPRansacListOfPoint3ListOfPointMatMatMatMatBooleanIntFloatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSolvePnPRansacMatMatMatMatMatMatBooleanIntFloatIntMat() {
|
||||
public void testSolvePnPRansacListOfPoint3ListOfPointMatMatMatMatBooleanIntFloatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
@ -582,5 +577,4 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
public void testValidateDisparityMatMatIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -4,10 +4,6 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class StereoBMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testComputeMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
@ -4,10 +4,6 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class StereoSGBMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCompute() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
@ -13,11 +13,7 @@ import org.opencv.core.Scalar;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.utils.Converters;
|
||||
|
||||
public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("CORE");
|
||||
}
|
||||
public class CoreTest extends OpenCVTestCase {
|
||||
|
||||
public void testAbsdiff() {
|
||||
Core.absdiff(gray128, gray255, dst);
|
||||
@ -167,9 +163,8 @@ public class coreTest extends OpenCVTestCase {
|
||||
try {
|
||||
Core.checkRange(outOfRange, false);
|
||||
fail("Core.checkRange should throw the CvException");
|
||||
} catch (Exception e) {
|
||||
if (!(e instanceof CvException))
|
||||
fail("Core.checkRange should throw the CvException");
|
||||
} catch (CvException e) {
|
||||
//expected
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,11 +218,9 @@ public class coreTest extends OpenCVTestCase {
|
||||
Scalar color0 = new Scalar(0);
|
||||
|
||||
assertTrue(0 == Core.countNonZero(gray0));
|
||||
Core.circle(gray0, center2, radius * 2, color128, 2, 4, 1/*
|
||||
* Number of
|
||||
Core.circle(gray0, center2, radius * 2, color128, 2, 4, 1/* Number of
|
||||
* fractional
|
||||
* bits
|
||||
*/);
|
||||
* bits */);
|
||||
Core.circle(gray0, center, radius, color0, 2, 4, 0);
|
||||
assertTrue(0 == Core.countNonZero(gray0));
|
||||
}
|
||||
@ -507,21 +500,21 @@ public class coreTest extends OpenCVTestCase {
|
||||
lp.add(new Point(1, 1));
|
||||
lp.add(new Point(5, 1));
|
||||
lp.add(new Point(5, 8));
|
||||
lp.add(new Point(1, 8));
|
||||
lp.add(new Point(1, 8));
|
||||
Mat points = Converters.vector_Point_to_Mat(lp);
|
||||
|
||||
|
||||
List<Point> lp2 = new ArrayList<Point>();
|
||||
lp2.add(new Point(0, 0));
|
||||
lp2.add(new Point(10, 2));
|
||||
lp2.add(new Point(10, 16));
|
||||
lp2.add(new Point(2, 16));
|
||||
Mat points2 = Converters.vector_Point_to_Mat(lp2);
|
||||
|
||||
|
||||
assertEquals(0, Core.countNonZero(gray0));
|
||||
Core.fillConvexPoly(gray0, points, colorWhite, 4 /*TODO: lineType*/, 0);
|
||||
Core.fillConvexPoly(gray0, points, colorWhite, 4 /* TODO: lineType */, 0);
|
||||
assertTrue(0 < Core.countNonZero(gray0));
|
||||
|
||||
Core.fillConvexPoly(gray0, points2, colorBlack, 4 /*TODO: lineType*/, 0);
|
||||
Core.fillConvexPoly(gray0, points2, colorBlack, 4 /* TODO: lineType */, 0);
|
||||
assertEquals(0, Core.countNonZero(gray0));
|
||||
}
|
||||
|
||||
@ -613,6 +606,10 @@ public class coreTest extends OpenCVTestCase {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetNumberOfCPUs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetOptimalDFTSize() {
|
||||
int vecsize = Core.getOptimalDFTSize(0);
|
||||
assertEquals(1, vecsize);
|
@ -0,0 +1,63 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvTypeTest extends OpenCVTestCase {
|
||||
|
||||
public void testMakeType() {
|
||||
assertEquals(CvType.CV_8UC4, CvType.makeType(CvType.CV_8U, 4));
|
||||
}
|
||||
|
||||
public void testCV_8UC() {
|
||||
assertEquals(CvType.CV_8UC4, CvType.CV_8UC(4));
|
||||
}
|
||||
|
||||
public void testCV_8SC() {
|
||||
assertEquals(CvType.CV_8SC4, CvType.CV_8SC(4));
|
||||
}
|
||||
|
||||
public void testCV_16UC() {
|
||||
assertEquals(CvType.CV_16UC4, CvType.CV_16UC(4));
|
||||
}
|
||||
|
||||
public void testCV_16SC() {
|
||||
assertEquals(CvType.CV_16SC4, CvType.CV_16SC(4));
|
||||
}
|
||||
|
||||
public void testCV_32SC() {
|
||||
assertEquals(CvType.CV_32SC4, CvType.CV_32SC(4));
|
||||
}
|
||||
|
||||
public void testCV_32FC() {
|
||||
assertEquals(CvType.CV_32FC4, CvType.CV_32FC(4));
|
||||
}
|
||||
|
||||
public void testCV_64FC() {
|
||||
assertEquals(CvType.CV_64FC4, CvType.CV_64FC(4));
|
||||
}
|
||||
|
||||
public void testChannels() {
|
||||
assertEquals(1, CvType.channels(CvType.CV_64F));
|
||||
}
|
||||
|
||||
public void testDepth() {
|
||||
assertEquals(CvType.CV_64F, CvType.depth(CvType.CV_64FC3));
|
||||
}
|
||||
|
||||
public void testIsInteger() {
|
||||
assertFalse(CvType.isInteger(CvType.CV_32FC3));
|
||||
assertTrue(CvType.isInteger(CvType.CV_16S));
|
||||
}
|
||||
|
||||
public void testELEM_SIZE() {
|
||||
assertEquals(3 * 8, CvType.ELEM_SIZE(CvType.CV_64FC3));
|
||||
}
|
||||
|
||||
public void testTypeToString() {
|
||||
assertEquals("CV_32FC1", CvType.typeToString(CvType.CV_32F));
|
||||
assertEquals("CV_32FC3", CvType.typeToString(CvType.CV_32FC3));
|
||||
assertEquals("CV_32FC(128)", CvType.typeToString(CvType.CV_32FC(128)));
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Scalar;
|
||||
@ -7,8 +9,16 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class MatTest extends OpenCVTestCase {
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("Mat");
|
||||
public void testAdjustROI() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testAssignToMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testAssignToMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testChannels() {
|
||||
@ -17,9 +27,23 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertEquals(4, rgba0.channels());
|
||||
}
|
||||
|
||||
public void testCheckVectorInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCheckVectorIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCheckVectorIntIntBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
dst = gray0.clone();
|
||||
assertMatEqual(gray0, dst);
|
||||
assertFalse(gray0.getNativeObjAddr() == dst.getNativeObjAddr());
|
||||
assertFalse(gray0.dataAddr() == dst.dataAddr());
|
||||
}
|
||||
|
||||
public void testCol() {
|
||||
@ -28,14 +52,30 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertEquals(gray0.rows(), col.rows());
|
||||
}
|
||||
|
||||
public void testColRange() {
|
||||
public void testColRangeIntInt() {
|
||||
Mat cols = gray0.colRange(0, gray0.cols() / 2);
|
||||
assertEquals(gray0.cols() / 2, cols.cols());
|
||||
assertEquals(gray0.rows(), cols.rows());
|
||||
}
|
||||
|
||||
public void testColRangeRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCols() {
|
||||
assertEquals(matSize, gray0.rows());
|
||||
assertEquals(matSize, gray0.cols());
|
||||
}
|
||||
|
||||
public void testConvertToMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testConvertToMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testConvertToMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCopyTo() {
|
||||
@ -43,6 +83,22 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertMatEqual(rgbLena, dst);
|
||||
}
|
||||
|
||||
public void testCopyToMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCopyToMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCross() {
|
||||
Mat answer = new Mat(1, 3, CvType.CV_32F);
|
||||
answer.put(0, 0, 7.0, 1.0, -5.0);
|
||||
@ -53,6 +109,7 @@ public class MatTest extends OpenCVTestCase {
|
||||
|
||||
public void testDataAddr() {
|
||||
assertTrue(0 != gray0.dataAddr());
|
||||
assertEquals(0, new Mat().dataAddr());
|
||||
}
|
||||
|
||||
public void testDepth() {
|
||||
@ -60,12 +117,16 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertEquals(CvType.CV_32F, gray0_32f.depth());
|
||||
}
|
||||
|
||||
public void testRelease() {
|
||||
assertTrue(gray0.empty() == false);
|
||||
assertTrue(gray0.rows() > 0);
|
||||
gray0.release();
|
||||
assertTrue(gray0.empty() == true);
|
||||
assertTrue(gray0.rows() == 0);
|
||||
public void testDiag() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDiagInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDiagMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDot() {
|
||||
@ -83,6 +144,10 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertEquals(3, rgbLena.elemSize());
|
||||
}
|
||||
|
||||
public void testElemSize1() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
assertTrue(dst.empty());
|
||||
assertTrue(!gray0.empty());
|
||||
@ -93,6 +158,14 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertMatEqual(eye, eye.inv(), EPS);
|
||||
}
|
||||
|
||||
public void testEyeIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEyeSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@ -102,8 +175,11 @@ public class MatTest extends OpenCVTestCase {
|
||||
byte[] goodData = new byte[9];
|
||||
byte[] badData = new byte[7];
|
||||
m.get(1, 1, goodData);
|
||||
|
||||
assertTrue(Arrays.equals(new byte[] { 1, 2, 3, 1, 2, 3, 1, 2, 3 }, goodData));
|
||||
|
||||
try {
|
||||
m.get(2, 2, badData);
|
||||
m.get(2, 2, badData);
|
||||
fail("Expected UnsupportedOperationException (data.length % CvType.channels(t) != 0)");
|
||||
} catch (UnsupportedOperationException e) {
|
||||
// expected
|
||||
@ -141,6 +217,10 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertMatEqual(grayE_32f, dst, EPS);
|
||||
}
|
||||
|
||||
public void testInvInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testIsContinuous() {
|
||||
assertTrue(gray0.isContinuous());
|
||||
|
||||
@ -154,9 +234,13 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertTrue(subMat.isSubmatrix());
|
||||
}
|
||||
|
||||
public void testLocateROI() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat() {
|
||||
Mat m = new Mat();
|
||||
assertTrue(null != m);
|
||||
assertNotNull(m);
|
||||
assertTrue(m.empty());
|
||||
}
|
||||
|
||||
@ -196,6 +280,50 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertMatEqual(m2, gray0_32f, EPS);
|
||||
}
|
||||
|
||||
public void testMatLong() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatMatRangeRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatMatRect() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatSizeIntScalar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMulMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMulMatDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testOnesIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testOnesSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPush_back() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPutIntIntByteArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@ -203,8 +331,9 @@ public class MatTest extends OpenCVTestCase {
|
||||
public void testPutIntIntDoubleArray() {
|
||||
Mat m = new Mat(5, 5, CvType.CV_8UC3);
|
||||
m.put(1, 1, 10, 20, 30, 40, 50, 60);
|
||||
|
||||
try {
|
||||
m.put(2, 2, 11, 22, 33, 44, 55);
|
||||
m.put(2, 2, 11, 22, 33, 44, 55);
|
||||
fail("Expected UnsupportedOperationException (data.length % CvType.channels(t) != 0)");
|
||||
} catch (UnsupportedOperationException e) {
|
||||
// expected
|
||||
@ -223,33 +352,92 @@ public class MatTest extends OpenCVTestCase {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRelease() {
|
||||
assertFalse(gray0.empty());
|
||||
assertTrue(gray0.rows() > 0);
|
||||
|
||||
gray0.release();
|
||||
|
||||
assertTrue(gray0.empty());
|
||||
assertEquals(0, gray0.rows());
|
||||
assertEquals(0, gray0.dataAddr());
|
||||
}
|
||||
|
||||
public void testReshapeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testReshapeIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRow() {
|
||||
Mat row = gray0.row(0);
|
||||
assertEquals(1, row.rows());
|
||||
assertEquals(gray0.cols(), row.cols());
|
||||
}
|
||||
|
||||
public void testRowRange() {
|
||||
public void testRowRangeIntInt() {
|
||||
fail("Not yet implemented");
|
||||
Mat rows = gray0.rowRange(0, gray0.rows() / 2);
|
||||
assertEquals(gray0.rows() / 2, rows.rows());
|
||||
assertEquals(gray0.cols(), rows.cols());
|
||||
}
|
||||
|
||||
public void testRowRangeRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRows() {
|
||||
assertEquals(matSize, gray0.rows());
|
||||
}
|
||||
|
||||
public void testSetTo() {
|
||||
gray0.setTo(new Scalar(127));
|
||||
assertMatEqual(gray127, gray0);
|
||||
public void testSetToMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSubmat() {
|
||||
public void testSetToMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSetToScalar() {
|
||||
gray0.setTo(new Scalar(127));
|
||||
assertMatEqual(gray127, gray0);
|
||||
|
||||
}
|
||||
|
||||
public void testSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStep1() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStep1Int() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSubmatIntIntIntInt() {
|
||||
Mat submat = gray0.submat(0, gray0.rows() / 2, 0, gray0.cols() / 2);
|
||||
assertTrue(submat.isSubmatrix());
|
||||
assertFalse(submat.isContinuous());
|
||||
assertEquals(gray0.rows() / 2, submat.rows());
|
||||
assertEquals(gray0.cols() / 2, submat.cols());
|
||||
}
|
||||
|
||||
public void testSubmatRangeRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSubmatRect() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testT() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
assertTrue(null != gray0.toString());
|
||||
}
|
||||
@ -271,4 +459,12 @@ public class MatTest extends OpenCVTestCase {
|
||||
assertEquals(rgba128.cols(), rgba128.width());
|
||||
}
|
||||
|
||||
public void testZerosIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testZerosSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,14 +5,14 @@ import org.opencv.core.Point3;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class Point3Test extends OpenCVTestCase {
|
||||
|
||||
|
||||
private Point3 p1;
|
||||
private Point3 p2;
|
||||
private Point3 p2;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
p1 = new Point3(2, 2, 2);
|
||||
p2 = new Point3(1, 1, 1);
|
||||
}
|
||||
@ -42,9 +42,13 @@ public class Point3Test extends OpenCVTestCase {
|
||||
assertFalse(flag);
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
assertEquals(p1.hashCode(), p1.hashCode());
|
||||
}
|
||||
|
||||
public void testPoint3() {
|
||||
p1 = new Point3();
|
||||
|
||||
|
||||
assertNotNull(p1);
|
||||
assertTrue(0 == p1.x);
|
||||
assertTrue(0 == p1.y);
|
||||
|
@ -5,14 +5,14 @@ import org.opencv.core.Rect;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class PointTest extends OpenCVTestCase {
|
||||
|
||||
|
||||
private Point p1;
|
||||
private Point p2;
|
||||
private Point p2;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
p1 = new Point(2, 2);
|
||||
p2 = new Point(1, 1);
|
||||
}
|
||||
@ -36,6 +36,10 @@ public class PointTest extends OpenCVTestCase {
|
||||
assertFalse(flag);
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
assertEquals(p1.hashCode(), p1.hashCode());
|
||||
}
|
||||
|
||||
public void testInside() {
|
||||
Rect rect = new Rect(0, 0, 5, 3);
|
||||
assertTrue(p1.inside(rect));
|
||||
@ -46,7 +50,7 @@ public class PointTest extends OpenCVTestCase {
|
||||
|
||||
public void testPoint() {
|
||||
Point p = new Point();
|
||||
|
||||
|
||||
assertNotNull(p);
|
||||
assertEquals(0.0, p.x);
|
||||
assertEquals(0.0, p.y);
|
||||
@ -62,7 +66,7 @@ public class PointTest extends OpenCVTestCase {
|
||||
|
||||
public void testPointDoubleDouble() {
|
||||
p1 = new Point(7, 5);
|
||||
|
||||
|
||||
assertNotNull(p1);
|
||||
assertEquals(7.0, p1.x);
|
||||
assertEquals(5.0, p1.y);
|
||||
|
@ -5,14 +5,14 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class RangeTest extends OpenCVTestCase {
|
||||
|
||||
Range range;
|
||||
Range r1;
|
||||
Range r2;
|
||||
Range range;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
range = new Range();
|
||||
r1 = new Range(1, 11);
|
||||
r2 = new Range(1, 1);
|
||||
@ -42,11 +42,15 @@ public class RangeTest extends OpenCVTestCase {
|
||||
|
||||
public void testEqualsObject() {
|
||||
assertFalse(r2.equals(r1));
|
||||
|
||||
|
||||
range = r1.clone();
|
||||
assertTrue(r1.equals(range));
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
assertEquals(r1.hashCode(), r1.hashCode());
|
||||
}
|
||||
|
||||
public void testIntersection() {
|
||||
range = r1.intersection(r2);
|
||||
assertEquals(r2, range);
|
||||
@ -54,7 +58,7 @@ public class RangeTest extends OpenCVTestCase {
|
||||
|
||||
public void testRange() {
|
||||
range = new Range();
|
||||
|
||||
|
||||
assertNotNull(range);
|
||||
assertEquals(0, range.start);
|
||||
assertEquals(0, range.end);
|
||||
@ -70,7 +74,7 @@ public class RangeTest extends OpenCVTestCase {
|
||||
|
||||
public void testRangeIntInt() {
|
||||
r1 = new Range(12, 13);
|
||||
|
||||
|
||||
assertNotNull(r1);
|
||||
assertEquals(12, r1.start);
|
||||
assertEquals(13, r1.end);
|
||||
|
@ -6,14 +6,14 @@ import org.opencv.core.Size;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class RectTest extends OpenCVTestCase {
|
||||
|
||||
|
||||
private Rect r;
|
||||
private Rect rect;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
r = new Rect();
|
||||
rect = new Rect(0, 0, 10, 10);
|
||||
}
|
||||
@ -38,7 +38,7 @@ public class RectTest extends OpenCVTestCase {
|
||||
|
||||
public void testContains() {
|
||||
Rect rect = new Rect(0, 0, 10, 10);
|
||||
|
||||
|
||||
Point p_inner = new Point(5, 5);
|
||||
Point p_outer = new Point(5, 55);
|
||||
Point p_bl = new Point(0, 0);
|
||||
@ -65,9 +65,13 @@ public class RectTest extends OpenCVTestCase {
|
||||
assertTrue(flag);
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
assertEquals(rect.hashCode(), rect.hashCode());
|
||||
}
|
||||
|
||||
public void testRect() {
|
||||
r = new Rect();
|
||||
|
||||
|
||||
assertEquals(0, r.x);
|
||||
assertEquals(0, r.y);
|
||||
assertEquals(0, r.width);
|
||||
@ -77,7 +81,7 @@ public class RectTest extends OpenCVTestCase {
|
||||
public void testRectDoubleArray() {
|
||||
double[] vals = { 1, 3, 5, 2 };
|
||||
r = new Rect(vals);
|
||||
|
||||
|
||||
assertEquals(1, r.x);
|
||||
assertEquals(3, r.y);
|
||||
assertEquals(5, r.width);
|
||||
@ -86,7 +90,7 @@ public class RectTest extends OpenCVTestCase {
|
||||
|
||||
public void testRectIntIntIntInt() {
|
||||
r = new Rect(1, 3, 5, 2);
|
||||
|
||||
|
||||
assertNotNull(rect);
|
||||
assertEquals(0, rect.x);
|
||||
assertEquals(0, rect.y);
|
||||
@ -97,8 +101,8 @@ public class RectTest extends OpenCVTestCase {
|
||||
public void testRectPointPoint() {
|
||||
Point p1 = new Point(4, 4);
|
||||
Point p2 = new Point(2, 3);
|
||||
|
||||
r = new Rect(p1, p2);
|
||||
|
||||
r = new Rect(p1, p2);
|
||||
assertNotNull(r);
|
||||
assertEquals(2, r.x);
|
||||
assertEquals(3, r.y);
|
||||
|
@ -21,10 +21,6 @@ public class RotatedRectTest extends OpenCVTestCase {
|
||||
angle = 40;
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("core.RotatedRect");
|
||||
}
|
||||
|
||||
public void testBoundingRect() {
|
||||
size = new Size(matSize / 2, matSize / 2);
|
||||
assertEquals(size.height, size.width);
|
||||
@ -85,6 +81,11 @@ public class RotatedRectTest extends OpenCVTestCase {
|
||||
assertTrue(!rrect1.equals(size));
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
RotatedRect rr = new RotatedRect(center, size, angle);
|
||||
assertEquals(rr.hashCode(), rr.hashCode());
|
||||
}
|
||||
|
||||
public void testPoints() {
|
||||
RotatedRect rrect = new RotatedRect(center, size, angle);
|
||||
|
||||
@ -105,28 +106,28 @@ public class RotatedRectTest extends OpenCVTestCase {
|
||||
Math.abs((p[1].x + p[3].x) / 2 - center.x) + Math.abs((p[1].y + p[3].y) / 2 - center.y) < EPS);
|
||||
|
||||
assertTrue("Orthogonal vectors 01 and 12",
|
||||
Math.abs((p[1].x - p[0].x) * (p[2].x - p[1].x) +
|
||||
(p[1].y - p[0].y) * (p[2].y - p[1].y)) < EPS);
|
||||
Math.abs((p[1].x - p[0].x) * (p[2].x - p[1].x) +
|
||||
(p[1].y - p[0].y) * (p[2].y - p[1].y)) < EPS);
|
||||
|
||||
assertTrue("Orthogonal vectors 12 and 23",
|
||||
Math.abs((p[2].x - p[1].x) * (p[3].x - p[2].x) +
|
||||
(p[2].y - p[1].y) * (p[3].y - p[2].y)) < EPS);
|
||||
Math.abs((p[2].x - p[1].x) * (p[3].x - p[2].x) +
|
||||
(p[2].y - p[1].y) * (p[3].y - p[2].y)) < EPS);
|
||||
|
||||
assertTrue("Orthogonal vectors 23 and 30",
|
||||
Math.abs((p[3].x - p[2].x) * (p[0].x - p[3].x) +
|
||||
(p[3].y - p[2].y) * (p[0].y - p[3].y)) < EPS);
|
||||
Math.abs((p[3].x - p[2].x) * (p[0].x - p[3].x) +
|
||||
(p[3].y - p[2].y) * (p[0].y - p[3].y)) < EPS);
|
||||
|
||||
assertTrue("Orthogonal vectors 30 and 01",
|
||||
Math.abs((p[0].x - p[3].x) * (p[1].x - p[0].x) +
|
||||
(p[0].y - p[3].y) * (p[1].y - p[0].y)) < EPS);
|
||||
Math.abs((p[0].x - p[3].x) * (p[1].x - p[0].x) +
|
||||
(p[0].y - p[3].y) * (p[1].y - p[0].y)) < EPS);
|
||||
|
||||
assertTrue("Length of the vector 01",
|
||||
Math.abs((p[1].x - p[0].x) * (p[1].x - p[0].x) +
|
||||
(p[1].y - p[0].y) * (p[1].y - p[0].y) - size.height * size.height) < EPS);
|
||||
Math.abs((p[1].x - p[0].x) * (p[1].x - p[0].x) +
|
||||
(p[1].y - p[0].y) * (p[1].y - p[0].y) - size.height * size.height) < EPS);
|
||||
|
||||
assertTrue("Length of the vector 21",
|
||||
Math.abs((p[1].x - p[2].x) * (p[1].x - p[2].x) +
|
||||
(p[1].y - p[2].y) * (p[1].y - p[2].y) - size.width * size.width) < EPS);
|
||||
Math.abs((p[1].x - p[2].x) * (p[1].x - p[2].x) +
|
||||
(p[1].y - p[2].y) * (p[1].y - p[2].y) - size.width * size.width) < EPS);
|
||||
|
||||
assertTrue("Angle of the vector 21 with the axes", Math.abs((p[2].x - p[1].x) / size.width - Math.cos(angle * Math.PI / 180)) < EPS);
|
||||
}
|
||||
@ -141,7 +142,7 @@ public class RotatedRectTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testRotatedRectDoubleArray() {
|
||||
double[] vals = {1.5, 2.6, 3.7, 4.2, 5.1};
|
||||
double[] vals = { 1.5, 2.6, 3.7, 4.2, 5.1 };
|
||||
RotatedRect rr = new RotatedRect(vals);
|
||||
|
||||
assertNotNull(rr);
|
||||
@ -161,4 +162,8 @@ public class RotatedRectTest extends OpenCVTestCase {
|
||||
assertTrue(rr.angle == 40.0);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,16 +5,16 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class ScalarTest extends OpenCVTestCase {
|
||||
|
||||
private Scalar dstScalar;
|
||||
private Scalar s1;
|
||||
private Scalar s2;
|
||||
private Scalar dstScalar;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
s1 = new Scalar(1.0);
|
||||
s2 = Scalar.all(1.0);
|
||||
s2 = Scalar.all(1.0);
|
||||
dstScalar = null;
|
||||
}
|
||||
|
||||
@ -42,6 +42,10 @@ public class ScalarTest extends OpenCVTestCase {
|
||||
assertFalse(s2.equals(s1));
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
assertEquals(s2.hashCode(), s2.hashCode());
|
||||
}
|
||||
|
||||
public void testIsReal() {
|
||||
assertTrue(s1.isReal());
|
||||
|
||||
@ -68,8 +72,8 @@ public class ScalarTest extends OpenCVTestCase {
|
||||
public void testScalarDoubleArray() {
|
||||
double[] vals = { 2.0, 4.0, 5.0, 3.0 };
|
||||
dstScalar = new Scalar(vals);
|
||||
|
||||
Scalar truth = new Scalar(2.0, 4.0, 5.0, 3.0);
|
||||
|
||||
Scalar truth = new Scalar(2.0, 4.0, 5.0, 3.0);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
|
@ -6,14 +6,14 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class SizeTest extends OpenCVTestCase {
|
||||
|
||||
Size dstSize;
|
||||
Size sz1;
|
||||
Size sz2;
|
||||
Size dstSize;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
sz1 = new Size(10.0, 10.0);
|
||||
sz2 = new Size(-1, -1);
|
||||
dstSize = null;
|
||||
@ -36,6 +36,10 @@ public class SizeTest extends OpenCVTestCase {
|
||||
assertTrue(sz1.equals(sz2));
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
assertEquals(sz1.hashCode(), sz1.hashCode());
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
sz2.set(vals1);
|
||||
@ -43,14 +47,14 @@ public class SizeTest extends OpenCVTestCase {
|
||||
assertEquals(0., sz2.height);
|
||||
|
||||
double[] vals2 = { 9, 12 };
|
||||
sz1 .set(vals2);
|
||||
sz1.set(vals2);
|
||||
assertEquals(9., sz1.width);
|
||||
assertEquals(12., sz1.height);
|
||||
}
|
||||
|
||||
public void testSize() {
|
||||
dstSize = new Size();
|
||||
|
||||
|
||||
assertNotNull(dstSize);
|
||||
assertEquals(0., dstSize.width);
|
||||
assertEquals(0., dstSize.height);
|
||||
|
@ -11,7 +11,7 @@ public class TermCriteriaTest extends OpenCVTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
tc1 = new TermCriteria();
|
||||
tc2 = new TermCriteria(2, 4, EPS);
|
||||
}
|
||||
@ -28,6 +28,10 @@ public class TermCriteriaTest extends OpenCVTestCase {
|
||||
assertTrue(tc2.equals(tc1));
|
||||
}
|
||||
|
||||
public void testHashCode() {
|
||||
assertEquals(tc2.hashCode(), tc2.hashCode());
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
tc1.set(vals1);
|
||||
@ -46,7 +50,7 @@ public class TermCriteriaTest extends OpenCVTestCase {
|
||||
|
||||
public void testTermCriteria() {
|
||||
tc1 = new TermCriteria();
|
||||
|
||||
|
||||
assertNotNull(tc1);
|
||||
assertEquals(0, tc1.type);
|
||||
assertEquals(0, tc1.maxCount);
|
||||
@ -64,7 +68,7 @@ public class TermCriteriaTest extends OpenCVTestCase {
|
||||
|
||||
public void testTermCriteriaIntIntDouble() {
|
||||
tc1 = new TermCriteria(2, 4, EPS);
|
||||
|
||||
|
||||
assertNotNull(tc2);
|
||||
assertEquals(2, tc2.type);
|
||||
assertEquals(4, tc2.maxCount);
|
||||
|
@ -34,7 +34,11 @@ public class BRIEFDescriptorExtractorTest extends OpenCVTestCase {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCompute() {
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
KeyPoint point = new KeyPoint(55.775577545166016f, 44.224422454833984f, 16, 9.754629f, 8617.863f, 1, -1);
|
||||
List<KeyPoint> keypoints = Arrays.asList(point);
|
||||
Mat img = getTestImg();
|
||||
|
@ -23,34 +23,12 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
|
||||
int matSize;
|
||||
DMatch[] truth;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE);
|
||||
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) };
|
||||
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
private Mat getTrainImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(20, matSize / 2), new Point(matSize - 21, matSize / 2), new Scalar(100), 2);
|
||||
Core.line(cross, new Point(matSize / 2, 20), new Point(matSize / 2, matSize - 21), new Scalar(100), 2);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(30, matSize / 2), new Point(matSize - 31, matSize / 2), new Scalar(100), 3);
|
||||
Core.line(cross, new Point(matSize / 2, 30), new Point(matSize / 2, matSize - 31), new Scalar(100), 3);
|
||||
|
||||
return cross;
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(5, 2, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0, 0, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Mat getQueryDescriptors() {
|
||||
@ -71,6 +49,14 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(30, matSize / 2), new Point(matSize - 31, matSize / 2), new Scalar(100), 3);
|
||||
Core.line(cross, new Point(matSize / 2, 30), new Point(matSize / 2, matSize - 31), new Scalar(100), 3);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
private Mat getTrainDescriptors() {
|
||||
Mat img = getTrainImg();
|
||||
List<KeyPoint> keypoints = Arrays.asList(new KeyPoint(50, 50, 16, 0, 20000, 1, -1), new KeyPoint(42, 42, 16, 160, 10000, 1, -1));
|
||||
@ -83,12 +69,26 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(5, 2, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0,0, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
private Mat getTrainImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(20, matSize / 2), new Point(matSize - 21, matSize / 2), new Scalar(100), 2);
|
||||
Core.line(cross, new Point(matSize / 2, 20), new Point(matSize / 2, matSize - 21), new Scalar(100), 2);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE);
|
||||
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) };
|
||||
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testAdd() {
|
||||
@ -104,15 +104,6 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.empty());
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
Mat train = new Mat(1, 1, CvType.CV_8U, new Scalar(123));
|
||||
Mat truth = train.clone();
|
||||
@ -127,6 +118,15 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth, descriptors.get(0));
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(matcher);
|
||||
}
|
||||
@ -150,29 +150,39 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.isMaskSupported());
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
public void testKnnMatchMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
// OpenCVTestRunner.Log("matches found: " + matches.size());
|
||||
// for (DMatch m : matches)
|
||||
// OpenCVTestRunner.Log(m.toString());
|
||||
matcher.match(query, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatchListOfMat() {
|
||||
@ -187,15 +197,53 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
|
||||
// OpenCVTestRunner.Log("matches found: " + matches.size());
|
||||
// for (DMatch m : matches)
|
||||
// OpenCVTestRunner.Log(m.toString());
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
|
@ -23,30 +23,24 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
|
||||
int matSize;
|
||||
DMatch[] truth;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
|
||||
matSize = 100;
|
||||
|
||||
truth = new DMatch[] {
|
||||
new DMatch (0, 0, 0, 51),
|
||||
new DMatch (1, 2, 0, 42),
|
||||
new DMatch (2, 1, 0, 40),
|
||||
new DMatch (3, 3, 0, 53) };
|
||||
super.setUp();
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(4, 4, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0, 0, 1, 1, 1, 1, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Mat getTrainImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, 40), new Point(matSize - 40, matSize - 40), new Scalar(0), 8);
|
||||
return img;
|
||||
private Mat getQueryDescriptors() {
|
||||
return getTestDescriptors(getQueryImg());
|
||||
}
|
||||
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, matSize - 40), new Point(matSize - 50, 50), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
|
||||
private Mat getTestDescriptors(Mat img) {
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
Mat descriptors = new Mat();
|
||||
@ -56,24 +50,30 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
|
||||
|
||||
detector.detect(img, keypoints);
|
||||
extractor.compute(img, keypoints, descriptors);
|
||||
|
||||
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getQueryDescriptors() {
|
||||
return getTestDescriptors(getQueryImg());
|
||||
}
|
||||
|
||||
private Mat getTrainDescriptors() {
|
||||
return getTestDescriptors(getTrainImg());
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(4, 4, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0, 0, 1, 1, 1, 1, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
private Mat getTrainImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, 40), new Point(matSize - 40, matSize - 40), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
|
||||
matSize = 100;
|
||||
|
||||
truth = new DMatch[] {
|
||||
new DMatch(0, 0, 0, 51),
|
||||
new DMatch(1, 2, 0, 42),
|
||||
new DMatch(2, 1, 0, 40),
|
||||
new DMatch(3, 3, 0, 53) };
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testAdd() {
|
||||
@ -89,15 +89,6 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.empty());
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
Mat train = new Mat(1, 1, CvType.CV_8U, new Scalar(123));
|
||||
Mat truth = train.clone();
|
||||
@ -112,6 +103,15 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth, descriptors.get(0));
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(matcher);
|
||||
}
|
||||
@ -135,24 +135,38 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.isMaskSupported());
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
public void testKnnMatchMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
@ -168,17 +182,51 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\n");
|
||||
|
@ -23,30 +23,24 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
|
||||
int matSize;
|
||||
DMatch[] truth;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMINGLUT);
|
||||
matSize = 100;
|
||||
|
||||
truth = new DMatch[] {
|
||||
new DMatch (0, 0, 0, 51),
|
||||
new DMatch (1, 2, 0, 42),
|
||||
new DMatch (2, 1, 0, 40),
|
||||
new DMatch (3, 3, 0, 53) };
|
||||
super.setUp();
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(4, 4, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0, 0, 1, 1, 1, 1, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Mat getTrainImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, 40), new Point(matSize - 40, matSize - 40), new Scalar(0), 8);
|
||||
return img;
|
||||
private Mat getQueryDescriptors() {
|
||||
return getTestDescriptors(getQueryImg());
|
||||
}
|
||||
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, matSize - 40), new Point(matSize - 50, 50), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
|
||||
private Mat getTestDescriptors(Mat img) {
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
Mat descriptors = new Mat();
|
||||
@ -56,24 +50,30 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
|
||||
|
||||
detector.detect(img, keypoints);
|
||||
extractor.compute(img, keypoints, descriptors);
|
||||
|
||||
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getQueryDescriptors() {
|
||||
return getTestDescriptors(getQueryImg());
|
||||
}
|
||||
|
||||
private Mat getTrainDescriptors() {
|
||||
return getTestDescriptors(getTrainImg());
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(4, 4, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0, 0, 1, 1, 1, 1, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
private Mat getTrainImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, 40), new Point(matSize - 40, matSize - 40), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMINGLUT);
|
||||
matSize = 100;
|
||||
|
||||
truth = new DMatch[] {
|
||||
new DMatch(0, 0, 0, 51),
|
||||
new DMatch(1, 2, 0, 42),
|
||||
new DMatch(2, 1, 0, 40),
|
||||
new DMatch(3, 3, 0, 53) };
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testAdd() {
|
||||
@ -89,15 +89,6 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.empty());
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
Mat train = new Mat(1, 1, CvType.CV_8U, new Scalar(123));
|
||||
Mat truth = train.clone();
|
||||
@ -112,6 +103,15 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth, descriptors.get(0));
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(matcher);
|
||||
}
|
||||
@ -135,28 +135,38 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.isMaskSupported());
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
public void testKnnMatchMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
OpenCVTestRunner.Log("matches found: " + matches.size());
|
||||
for (DMatch m : matches)
|
||||
OpenCVTestRunner.Log(m.toString());
|
||||
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
@ -172,17 +182,55 @@ public class BruteForceHammingLUTDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
OpenCVTestRunner.Log("matches found: " + matches.size());
|
||||
for (DMatch m : matches)
|
||||
OpenCVTestRunner.Log(m.toString());
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\n");
|
||||
|
@ -23,33 +23,12 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
|
||||
int matSize;
|
||||
DMatch[] truth;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_L1);
|
||||
matSize = 100;
|
||||
|
||||
truth = new DMatch[] {
|
||||
new DMatch(0, 0, 0, 3.175296f),
|
||||
new DMatch(1, 1, 0, 3.5954158f),
|
||||
new DMatch(2, 1, 0, 1.2537984f),
|
||||
new DMatch(3, 1, 0, 3.5761614f),
|
||||
new DMatch(4, 1, 0, 1.3250958f) };
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
private Mat getTrainImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(20, matSize / 2), new Point(matSize - 21, matSize / 2), new Scalar(100), 2);
|
||||
Core.line(cross, new Point(matSize / 2, 20), new Point(matSize / 2, matSize - 21), new Scalar(100), 2);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(30, matSize / 2), new Point(matSize - 31, matSize / 2), new Scalar(100), 3);
|
||||
Core.line(cross, new Point(matSize / 2, 30), new Point(matSize / 2, matSize - 31), new Scalar(100), 3);
|
||||
|
||||
return cross;
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(5, 2, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0, 0, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Mat getQueryDescriptors() {
|
||||
@ -70,6 +49,14 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(30, matSize / 2), new Point(matSize - 31, matSize / 2), new Scalar(100), 3);
|
||||
Core.line(cross, new Point(matSize / 2, 30), new Point(matSize / 2, matSize - 31), new Scalar(100), 3);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
private Mat getTrainDescriptors() {
|
||||
Mat img = getTrainImg();
|
||||
List<KeyPoint> keypoints = Arrays.asList(new KeyPoint(50, 50, 16, 0, 20000, 1, -1), new KeyPoint(42, 42, 16, 160, 10000, 1, -1));
|
||||
@ -82,12 +69,25 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(5, 2, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0,0, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
private Mat getTrainImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(20, matSize / 2), new Point(matSize - 21, matSize / 2), new Scalar(100), 2);
|
||||
Core.line(cross, new Point(matSize / 2, 20), new Point(matSize / 2, matSize - 21), new Scalar(100), 2);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_L1);
|
||||
matSize = 100;
|
||||
|
||||
truth = new DMatch[] {
|
||||
new DMatch(0, 0, 0, 3.175296f),
|
||||
new DMatch(1, 1, 0, 3.5954158f),
|
||||
new DMatch(2, 1, 0, 1.2537984f),
|
||||
new DMatch(3, 1, 0, 3.5761614f),
|
||||
new DMatch(4, 1, 0, 1.3250958f) };
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testAdd() {
|
||||
@ -103,15 +103,6 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.empty());
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
Mat train = new Mat(1, 1, CvType.CV_8U, new Scalar(123));
|
||||
Mat truth = train.clone();
|
||||
@ -126,6 +117,15 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth, descriptors.get(0));
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(matcher);
|
||||
}
|
||||
@ -149,24 +149,38 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.isMaskSupported());
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
public void testKnnMatchMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
@ -182,17 +196,51 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
matcher.add(Arrays.asList(train));
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth[0], truth[1]), matches, EPS);
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\n");
|
||||
|
@ -0,0 +1,27 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DMatchTest extends TestCase {
|
||||
|
||||
public void testDMatch() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDMatchIntIntFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDMatchIntIntIntFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testLessThan() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicFASTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicGFTTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicHARRISFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicMSERFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicORBFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicSIFTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicSTARFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DynamicSURFFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -19,6 +19,19 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
|
||||
FeatureDetector detector;
|
||||
KeyPoint[] truth;
|
||||
|
||||
private Mat getMaskImg() {
|
||||
Mat mask = new Mat(100, 100, CvType.CV_8U, new Scalar(255));
|
||||
Mat right = mask.submat(0, 100, 50, 100);
|
||||
right.setTo(new Scalar(0));
|
||||
return mask;
|
||||
}
|
||||
|
||||
private Mat getTestImg() {
|
||||
Mat img = new Mat(100, 100, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(30, 30), new Point(70, 70), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
detector = FeatureDetector.create(FeatureDetector.FAST);
|
||||
@ -29,31 +42,16 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
private Mat getTestImg() {
|
||||
Mat img = new Mat(100, 100, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(30, 30), new Point(70, 70), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
Mat mask = new Mat(100, 100, CvType.CV_8U, new Scalar(255));
|
||||
Mat right = mask.submat(0, 100, 50, 100);
|
||||
right.setTo(new Scalar(0));
|
||||
return mask;
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(detector);
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
Mat img = getTestImg();
|
||||
Mat mask = getMaskImg();
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
detector.detect(img, keypoints, mask);
|
||||
|
||||
assertListKeyPointEquals(Arrays.asList(truth[0], truth[1]), keypoints, EPS);
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
@ -69,6 +67,16 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
|
||||
// OpenCVTestRunner.Log(kp.toString());
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
Mat img = getTestImg();
|
||||
Mat mask = getMaskImg();
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
|
||||
detector.detect(img, keypoints, mask);
|
||||
|
||||
assertListKeyPointEquals(Arrays.asList(truth[0], truth[1]), keypoints, EPS);
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
assertFalse(detector.empty());
|
||||
}
|
||||
|
@ -19,66 +19,119 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class features2dTest extends OpenCVTestCase {
|
||||
|
||||
public class Features2dTest extends OpenCVTestCase {
|
||||
|
||||
public void testDrawKeypointsMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawKeypointsMatListOfKeyPointMatScalar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawKeypointsMatListOfKeyPointMatScalarInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatches2MatListOfKeyPointMatListOfKeyPointListOfListOfDMatchMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatches2MatListOfKeyPointMatListOfKeyPointListOfListOfDMatchMatScalar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatches2MatListOfKeyPointMatListOfKeyPointListOfListOfDMatchMatScalarScalar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatches2MatListOfKeyPointMatListOfKeyPointListOfListOfDMatchMatScalarScalarListOfListOfByte() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatches2MatListOfKeyPointMatListOfKeyPointListOfListOfDMatchMatScalarScalarListOfListOfByteInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatchesMatListOfKeyPointMatListOfKeyPointListOfDMatchMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatchesMatListOfKeyPointMatListOfKeyPointListOfDMatchMatScalar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatchesMatListOfKeyPointMatListOfKeyPointListOfDMatchMatScalarScalar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatchesMatListOfKeyPointMatListOfKeyPointListOfDMatchMatScalarScalarListOfByte() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDrawMatchesMatListOfKeyPointMatListOfKeyPointListOfDMatchMatScalarScalarListOfByteInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPTOD()
|
||||
{
|
||||
String detectorCfg = "%YAML:1.0\nhessianThreshold: 4000.\noctaves: 3\noctaveLayers: 4\nupright: 0\n";
|
||||
String extractorCfg = "%YAML:1.0\nnOctaves: 4\nnOctaveLayers: 2\nextended: 0\nupright: 0\n";
|
||||
|
||||
|
||||
FeatureDetector detector = FeatureDetector.create(FeatureDetector.SURF);
|
||||
DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.SURF);
|
||||
DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE);
|
||||
|
||||
|
||||
String detectorCfgFile = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(detectorCfgFile, detectorCfg);
|
||||
detector.read(detectorCfgFile);
|
||||
|
||||
|
||||
String extractorCfgFile = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(extractorCfgFile, extractorCfg);
|
||||
extractor.read(extractorCfgFile);
|
||||
|
||||
|
||||
Mat imgTrain = Highgui.imread(OpenCVTestRunner.LENA_PATH, Highgui.CV_LOAD_IMAGE_GRAYSCALE);
|
||||
Mat imgQuery = imgTrain.submat(new Range(0, imgTrain.rows()-100), Range.all());
|
||||
|
||||
Mat imgQuery = imgTrain.submat(new Range(0, imgTrain.rows() - 100), Range.all());
|
||||
|
||||
List<KeyPoint> trainKeypoints = new ArrayList<KeyPoint>();
|
||||
List<KeyPoint> queryKeypoints = new ArrayList<KeyPoint>();
|
||||
|
||||
|
||||
detector.detect(imgTrain, trainKeypoints);
|
||||
detector.detect(imgQuery, queryKeypoints);
|
||||
|
||||
//OpenCVTestRunner.Log("Keypoints found: " + trainKeypoints.size() + ":" + queryKeypoints.size());
|
||||
|
||||
|
||||
// OpenCVTestRunner.Log("Keypoints found: " + trainKeypoints.size() +
|
||||
// ":" + queryKeypoints.size());
|
||||
|
||||
Mat trainDescriptors = new Mat();
|
||||
Mat queryDescriptors = new Mat();
|
||||
|
||||
|
||||
extractor.compute(imgTrain, trainKeypoints, trainDescriptors);
|
||||
extractor.compute(imgQuery, queryKeypoints, queryDescriptors);
|
||||
|
||||
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
|
||||
matcher.add(Arrays.asList(trainDescriptors));
|
||||
matcher.match(queryDescriptors, matches);
|
||||
|
||||
//OpenCVTestRunner.Log("Matches found: " + matches.size());
|
||||
|
||||
|
||||
// OpenCVTestRunner.Log("Matches found: " + matches.size());
|
||||
|
||||
List<Point> points1 = new ArrayList<Point>();
|
||||
List<Point> points2 = new ArrayList<Point>();
|
||||
|
||||
for(int i = 0; i < matches.size(); i++){
|
||||
|
||||
for (int i = 0; i < matches.size(); i++) {
|
||||
DMatch match = matches.get(i);
|
||||
points1.add(trainKeypoints.get(match.trainIdx).pt);
|
||||
points2.add(queryKeypoints.get(match.queryIdx).pt);
|
||||
}
|
||||
|
||||
|
||||
Mat hmg = Calib3d.findHomography(points1, points2, Calib3d.RANSAC);
|
||||
|
||||
|
||||
assertMatEqual(Mat.eye(3, 3, CvType.CV_64F), hmg, EPS);
|
||||
|
||||
|
||||
Mat outimg = new Mat();
|
||||
Features2d.drawMatches(imgQuery, queryKeypoints, imgTrain, trainKeypoints, matches, outimg);
|
||||
String outputPath = OpenCVTestRunner.getOutputFileName("PTODresult.png");
|
||||
Highgui.imwrite(outputPath, outimg);
|
||||
//OpenCVTestRunner.Log("Output image is saved to: " + outputPath);
|
||||
// OpenCVTestRunner.Log("Output image is saved to: " + outputPath);
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class FernGenericDescriptorMatcherTest extends OpenCVTestCase {
|
||||
|
||||
public void testAdd() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClassifyMatListOfKeyPointMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClassifyMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetTrainImages() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetTrainKeypoints() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testIsMaskSupported() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchIntMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointListOfListOfDMatchIntListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointListOfListOfDMatchIntListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointMatListOfKeyPointListOfDMatchMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointMatListOfKeyPointListOfDMatch() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointListOfDMatchListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointListOfDMatch() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchFloatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchFloatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointListOfListOfDMatchFloatListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointListOfListOfDMatchFloatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -20,111 +20,123 @@ import java.util.List;
|
||||
|
||||
public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
|
||||
DescriptorMatcher matcher;
|
||||
int matSize;
|
||||
DMatch[] truth;
|
||||
|
||||
static final String ymlParamsDefault = "%YAML:1.0\n"
|
||||
+ "indexParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: algorithm\n"
|
||||
+ " type: 23\n"
|
||||
+ " value: 1\n"
|
||||
+ " -\n"
|
||||
+ " name: trees\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 4\n"
|
||||
+ "searchParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: checks\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 32\n"
|
||||
+ " -\n"
|
||||
+ " name: eps\n"
|
||||
+ " type: 5\n"
|
||||
+ " value: 0.\n"
|
||||
+ " -\n"
|
||||
+ " name: sorted\n"
|
||||
+ " type: 15\n"
|
||||
+ " value: 1\n";
|
||||
|
||||
static final String xmlParamsDefault = "<?xml version=\"1.0\"?>\n"
|
||||
+ "<opencv_storage>\n"
|
||||
+ "<indexParams>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>algorithm</name>\n"
|
||||
+ " <type>23</type>\n"
|
||||
+ " <value>1</value></_>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>trees</name>\n"
|
||||
+ " <type>4</type>\n"
|
||||
+ " <value>4</value></_></indexParams>\n"
|
||||
+ "<searchParams>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>checks</name>\n"
|
||||
+ " <type>4</type>\n"
|
||||
+ " <value>32</value></_>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>eps</name>\n"
|
||||
+ " <type>5</type>\n"
|
||||
+ " <value>0.</value></_>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>sorted</name>\n"
|
||||
+ " <type>15</type>\n"
|
||||
+ " <value>1</value></_></searchParams>\n"
|
||||
+ "</opencv_storage>\n";
|
||||
|
||||
+ "<opencv_storage>\n"
|
||||
+ "<indexParams>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>algorithm</name>\n"
|
||||
+ " <type>23</type>\n"
|
||||
+ " <value>1</value></_>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>trees</name>\n"
|
||||
+ " <type>4</type>\n"
|
||||
+ " <value>4</value></_></indexParams>\n"
|
||||
+ "<searchParams>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>checks</name>\n"
|
||||
+ " <type>4</type>\n"
|
||||
+ " <value>32</value></_>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>eps</name>\n"
|
||||
+ " <type>5</type>\n"
|
||||
+ " <value>0.</value></_>\n"
|
||||
+ " <_>\n"
|
||||
+ " <name>sorted</name>\n"
|
||||
+ " <type>15</type>\n"
|
||||
+ " <value>1</value></_></searchParams>\n"
|
||||
+ "</opencv_storage>\n";
|
||||
static final String ymlParamsDefault = "%YAML:1.0\n"
|
||||
+ "indexParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: algorithm\n"
|
||||
+ " type: 23\n"
|
||||
+ " value: 1\n"
|
||||
+ " -\n"
|
||||
+ " name: trees\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 4\n"
|
||||
+ "searchParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: checks\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 32\n"
|
||||
+ " -\n"
|
||||
+ " name: eps\n"
|
||||
+ " type: 5\n"
|
||||
+ " value: 0.\n"
|
||||
+ " -\n"
|
||||
+ " name: sorted\n"
|
||||
+ " type: 15\n"
|
||||
+ " value: 1\n";
|
||||
static final String ymlParamsModified = "%YAML:1.0\n"
|
||||
+ "indexParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: algorithm\n"
|
||||
+ " type: 23\n"
|
||||
+ " value: 6\n"//this line is changed
|
||||
+ " -\n"
|
||||
+ " name: trees\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 4\n"
|
||||
+ "searchParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: checks\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 32\n"
|
||||
+ " -\n"
|
||||
+ " name: eps\n"
|
||||
+ " type: 5\n"
|
||||
+ " value: 0.\n"
|
||||
+ " -\n"
|
||||
+ " name: sorted\n"
|
||||
+ " type: 15\n"
|
||||
+ " value: 1\n";
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.FLANNBASED);
|
||||
matSize = 100;
|
||||
+ "indexParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: algorithm\n"
|
||||
+ " type: 23\n"
|
||||
+ " value: 6\n"// this line is changed!
|
||||
+ " -\n"
|
||||
+ " name: trees\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 4\n"
|
||||
+ "searchParams:\n"
|
||||
+ " -\n"
|
||||
+ " name: checks\n"
|
||||
+ " type: 4\n"
|
||||
+ " value: 32\n"
|
||||
+ " -\n"
|
||||
+ " name: eps\n"
|
||||
+ " type: 5\n"
|
||||
+ " value: 0.\n"
|
||||
+ " -\n"
|
||||
+ " name: sorted\n"
|
||||
+ " type: 15\n"
|
||||
+ " value: 1\n";
|
||||
|
||||
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) };
|
||||
DescriptorMatcher matcher;
|
||||
|
||||
super.setUp();
|
||||
int matSize;
|
||||
|
||||
DMatch[] truth;
|
||||
|
||||
private Mat getBriefQueryDescriptors() {
|
||||
return getBriefTestDescriptors(getBriefQueryImg());
|
||||
}
|
||||
|
||||
private Mat getTrainImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(20, matSize / 2), new Point(matSize - 21, matSize / 2), new Scalar(100), 2);
|
||||
Core.line(cross, new Point(matSize / 2, 20), new Point(matSize / 2, matSize - 21), new Scalar(100), 2);
|
||||
|
||||
return cross;
|
||||
private Mat getBriefQueryImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, matSize - 40), new Point(matSize - 50, 50), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(30, matSize / 2), new Point(matSize - 31, matSize / 2), new Scalar(100), 3);
|
||||
Core.line(cross, new Point(matSize / 2, 30), new Point(matSize / 2, matSize - 31), new Scalar(100), 3);
|
||||
private Mat getBriefTestDescriptors(Mat img) {
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
Mat descriptors = new Mat();
|
||||
|
||||
return cross;
|
||||
FeatureDetector detector = FeatureDetector.create(FeatureDetector.FAST);
|
||||
DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.BRIEF);
|
||||
|
||||
detector.detect(img, keypoints);
|
||||
extractor.compute(img, keypoints, descriptors);
|
||||
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getBriefTrainDescriptors() {
|
||||
return getBriefTestDescriptors(getBriefTrainImg());
|
||||
}
|
||||
|
||||
private Mat getBriefTrainImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, 40), new Point(matSize - 40, matSize - 40), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(5, 2, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0, 0, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Mat getQueryDescriptors() {
|
||||
@ -145,6 +157,14 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getQueryImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(30, matSize / 2), new Point(matSize - 31, matSize / 2), new Scalar(100), 3);
|
||||
Core.line(cross, new Point(matSize / 2, 30), new Point(matSize / 2, matSize - 31), new Scalar(100), 3);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
private Mat getTrainDescriptors() {
|
||||
Mat img = getTrainImg();
|
||||
List<KeyPoint> keypoints = Arrays.asList(new KeyPoint(50, 50, 16, 0, 20000, 1, -1), new KeyPoint(42, 42, 16, 160, 10000, 1, -1));
|
||||
@ -157,45 +177,26 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
return new Mat(5, 2, CvType.CV_8U, new Scalar(0)) {
|
||||
{
|
||||
put(0,0, 1, 1, 1, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Mat getBriefTrainImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, 40), new Point(matSize - 40, matSize - 40), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
private Mat getBriefQueryImg() {
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(img, new Point(40, matSize - 40), new Point(matSize - 50, 50), new Scalar(0), 8);
|
||||
return img;
|
||||
}
|
||||
|
||||
private Mat getBriefTestDescriptors(Mat img) {
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
Mat descriptors = new Mat();
|
||||
private Mat getTrainImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.line(cross, new Point(20, matSize / 2), new Point(matSize - 21, matSize / 2), new Scalar(100), 2);
|
||||
Core.line(cross, new Point(matSize / 2, 20), new Point(matSize / 2, matSize - 21), new Scalar(100), 2);
|
||||
|
||||
FeatureDetector detector = FeatureDetector.create(FeatureDetector.FAST);
|
||||
DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.BRIEF);
|
||||
|
||||
detector.detect(img, keypoints);
|
||||
extractor.compute(img, keypoints, descriptors);
|
||||
|
||||
return descriptors;
|
||||
return cross;
|
||||
}
|
||||
|
||||
private Mat getBriefQueryDescriptors() {
|
||||
return getBriefTestDescriptors(getBriefQueryImg());
|
||||
}
|
||||
|
||||
private Mat getBriefTrainDescriptors() {
|
||||
return getBriefTestDescriptors(getBriefTrainImg());
|
||||
protected void setUp() throws Exception {
|
||||
matcher = DescriptorMatcher.create(DescriptorMatcher.FLANNBASED);
|
||||
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) };
|
||||
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testAdd() {
|
||||
@ -211,15 +212,6 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertTrue(matcher.empty());
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
Mat train = new Mat(1, 1, CvType.CV_8U, new Scalar(123));
|
||||
matcher.add(Arrays.asList(train));
|
||||
@ -232,6 +224,15 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
matcher.add(Arrays.asList(new Mat()));
|
||||
|
||||
DescriptorMatcher cloned = matcher.clone(true);
|
||||
|
||||
assertNotNull(cloned);
|
||||
assertTrue(cloned.empty());
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(matcher);
|
||||
}
|
||||
@ -255,29 +256,40 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertFalse(matcher.isMaskSupported());
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
public void testKnnMatchMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfListOfDMatchIntListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatMatListOfListOfDMatchIntMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
matcher.add(Arrays.asList(train));
|
||||
matcher.train();
|
||||
|
||||
// OpenCVTestRunner.Log("matches found: " + matches.size());
|
||||
// for (DMatch m : matches)
|
||||
// OpenCVTestRunner.Log(m.toString());
|
||||
matcher.match(query, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatchListOfMat() {
|
||||
@ -293,34 +305,71 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
public void testMatchMatListOfDMatch() {
|
||||
public void testMatchMatMatListOfDMatch() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
matcher.add(Arrays.asList(train));
|
||||
matcher.train();
|
||||
|
||||
matcher.match(query, matches);
|
||||
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
|
||||
// OpenCVTestRunner.Log("matches found: " + matches.size());
|
||||
// for (DMatch m : matches)
|
||||
// OpenCVTestRunner.Log(m.toString());
|
||||
}
|
||||
|
||||
public void testMatchMatMatListOfDMatchMat() {
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
Mat mask = getMaskImg();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
matcher.match(query, train, matches, mask);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(truth), matches, EPS);
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatMatListOfListOfDMatchFloatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, ymlParamsModified);
|
||||
|
||||
|
||||
matcher.read(filename);
|
||||
|
||||
|
||||
Mat train = getBriefTrainDescriptors();
|
||||
Mat query = getBriefQueryDescriptors();
|
||||
List<DMatch> matches = new ArrayList<DMatch>();
|
||||
|
||||
|
||||
matcher.match(query, train, matches);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(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, EPS);
|
||||
|
||||
assertListDMatchEquals(Arrays.asList(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, EPS);
|
||||
}
|
||||
|
||||
public void testTrain() {
|
||||
@ -328,7 +377,7 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
|
||||
matcher.add(Arrays.asList(train));
|
||||
matcher.train();
|
||||
}
|
||||
|
||||
|
||||
public void testTrainNoData() {
|
||||
try {
|
||||
matcher.train();
|
||||
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GFTTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridFASTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridGFTTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridHARRISFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridMSERFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridORBFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridSIFTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridSTARFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class GridSURFFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class HARRISFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -20,10 +20,6 @@ public class KeyPointTest extends OpenCVTestCase {
|
||||
size = 3.0f;
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("features2d.KeyPoint");
|
||||
}
|
||||
|
||||
public void testGet_angle() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@ -102,4 +98,8 @@ public class KeyPointTest extends OpenCVTestCase {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class MSERFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -34,7 +34,11 @@ public class ORBDescriptorExtractorTest extends OpenCVTestCase {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCompute() {
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
KeyPoint point = new KeyPoint(55.775577545166016f, 44.224422454833984f, 16, 9.754629f, 8617.863f, 1, -1);
|
||||
List<KeyPoint> keypoints = Arrays.asList(point);
|
||||
Mat img = getTestImg();
|
||||
@ -72,17 +76,17 @@ public class ORBDescriptorExtractorTest extends OpenCVTestCase {
|
||||
List<KeyPoint> keypoints = Arrays.asList(point);
|
||||
Mat img = getTestImg();
|
||||
Mat descriptors = new Mat();
|
||||
|
||||
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\nscaleFactor: 1.1\nnLevels: 3\nfirstLevel: 0\nedgeThreshold: 31\npatchSize: 31\n");
|
||||
extractor.read(filename);
|
||||
|
||||
|
||||
extractor.compute(img, keypoints, descriptors);
|
||||
|
||||
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);
|
||||
252, 119, 191, 4, 2, 66, 1, 66, 145);
|
||||
}
|
||||
};
|
||||
assertMatEqual(truth, descriptors);
|
||||
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class ORBFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class OneWayGenericDescriptorMatcherTest extends OpenCVTestCase {
|
||||
|
||||
public void testAdd() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClassifyMatListOfKeyPointMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClassifyMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCloneBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetTrainImages() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetTrainKeypoints() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testIsMaskSupported() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchIntMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointListOfListOfDMatchIntListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointListOfListOfDMatchIntListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKnnMatchMatListOfKeyPointListOfListOfDMatchInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointMatListOfKeyPointListOfDMatchMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointMatListOfKeyPointListOfDMatch() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointListOfDMatchListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMatchMatListOfKeyPointListOfDMatch() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchFloatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchFloatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointMatListOfKeyPointListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointListOfListOfDMatchFloatListOfMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointListOfListOfDMatchFloatListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfKeyPointListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class OpponentBRIEFDescriptorExtractorTest extends TestCase {
|
||||
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorType() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class OpponentORBDescriptorExtractorTest extends TestCase {
|
||||
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorType() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class OpponentSIFTDescriptorExtractorTest extends TestCase {
|
||||
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorType() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class OpponentSURFDescriptorExtractorTest extends TestCase {
|
||||
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDescriptorType() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidFASTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidGFTTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidHARRISFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidMSERFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidORBFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidSIFTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidSTARFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class PyramidSURFFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -17,8 +17,8 @@ public class SIFTDescriptorExtractorTest extends OpenCVTestCase {
|
||||
|
||||
DescriptorExtractor extractor;
|
||||
KeyPoint keypoint;
|
||||
Mat truth;
|
||||
int matSize;
|
||||
Mat truth;
|
||||
|
||||
private Mat getTestImg() {
|
||||
Mat cross = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
@ -35,7 +35,7 @@ public class SIFTDescriptorExtractorTest extends OpenCVTestCase {
|
||||
matSize = 100;
|
||||
truth = new Mat(1, 128, CvType.CV_32FC1) {
|
||||
{
|
||||
put(0,0, 123, 0, 0, 1, 123, 0, 0, 1, 123, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
put(0, 0, 123, 0, 0, 1, 123, 0, 0, 1, 123, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 123, 0, 0, 2, 123, 0, 0, 2, 123, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 30,
|
||||
7, 31, 123, 0, 0, 0, 123, 52, 88, 0, 0, 0, 0, 0, 0, 2, 123, 0, 0, 0, 0, 0, 0, 1, 110, 0, 0, 0, 0, 0, 18, 37, 18, 34, 16,
|
||||
21, 12, 23, 12, 50, 123, 0, 0, 0, 90, 26, 0, 3, 123, 0, 0, 1, 122, 0, 0, 2, 123, 0, 0, 1, 93, 0);
|
||||
@ -45,7 +45,11 @@ public class SIFTDescriptorExtractorTest extends OpenCVTestCase {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCompute() {
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
List<KeyPoint> keypoints = Arrays.asList(keypoint);
|
||||
Mat img = getTestImg();
|
||||
Mat descriptors = new Mat();
|
||||
@ -77,7 +81,8 @@ public class SIFTDescriptorExtractorTest extends OpenCVTestCase {
|
||||
Mat descriptors = new Mat();
|
||||
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\nmagnification: 3.\nisNormalize: 1\nrecalculateAngles: 1\nnOctaves: 6\nnOctaveLayers: 4\nfirstOctave: -1\nangleMode: 0\n");
|
||||
writeFile(filename,
|
||||
"%YAML:1.0\nmagnification: 3.\nisNormalize: 1\nrecalculateAngles: 1\nnOctaves: 6\nnOctaveLayers: 4\nfirstOctave: -1\nangleMode: 0\n");
|
||||
|
||||
extractor.read(filename);
|
||||
|
||||
|
@ -0,0 +1,39 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class SIFTFeatureDetectorTest extends TestCase {
|
||||
|
||||
public void testCreate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testWrite() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -17,8 +17,30 @@ import java.util.List;
|
||||
public class STARFeatureDetectorTest extends OpenCVTestCase {
|
||||
|
||||
FeatureDetector detector;
|
||||
KeyPoint[] truth;
|
||||
int matSize;
|
||||
KeyPoint[] truth;
|
||||
|
||||
private Mat getMaskImg() {
|
||||
Mat mask = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Mat right = mask.submat(0, matSize, matSize / 2, matSize);
|
||||
right.setTo(new Scalar(0));
|
||||
return mask;
|
||||
}
|
||||
|
||||
private Mat getTestImg() {
|
||||
Scalar color = new Scalar(0);
|
||||
int center = matSize / 2;
|
||||
int radius = 6;
|
||||
int offset = 40;
|
||||
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.circle(img, new Point(center - offset, center), radius, color, -1);
|
||||
Core.circle(img, new Point(center + offset, center), radius, color, -1);
|
||||
Core.circle(img, new Point(center, center - offset), radius, color, -1);
|
||||
Core.circle(img, new Point(center, center + offset), radius, color, -1);
|
||||
Core.circle(img, new Point(center, center), radius, color, -1);
|
||||
return img;
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
detector = FeatureDetector.create(FeatureDetector.STAR);
|
||||
@ -39,32 +61,27 @@ public class STARFeatureDetectorTest extends OpenCVTestCase {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
private Mat getTestImg() {
|
||||
Scalar color = new Scalar(0);
|
||||
int center = matSize / 2;
|
||||
int radius = 6;
|
||||
int offset = 40;
|
||||
|
||||
Mat img = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Core.circle(img, new Point(center - offset, center), radius, color, -1);
|
||||
Core.circle(img, new Point(center + offset, center), radius, color, -1);
|
||||
Core.circle(img, new Point(center, center - offset), radius, color, -1);
|
||||
Core.circle(img, new Point(center, center + offset), radius, color, -1);
|
||||
Core.circle(img, new Point(center, center), radius, color, -1);
|
||||
return img;
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
Mat mask = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Mat right = mask.submat(0, matSize, matSize / 2, matSize);
|
||||
right.setTo(new Scalar(0));
|
||||
return mask;
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(detector);
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
Mat img = getTestImg();
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
|
||||
detector.detect(img, keypoints);
|
||||
|
||||
assertListKeyPointEquals(Arrays.asList(truth), keypoints, EPS);
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
Mat img = getTestImg();
|
||||
Mat mask = getMaskImg();
|
||||
@ -75,32 +92,23 @@ public class STARFeatureDetectorTest extends OpenCVTestCase {
|
||||
assertListKeyPointEquals(Arrays.asList(truth[0], truth[2], truth[5], truth[7]), keypoints, EPS);
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
Mat img = getTestImg();
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
|
||||
detector.detect(img, keypoints);
|
||||
|
||||
assertListKeyPointEquals(Arrays.asList(truth), keypoints, EPS);
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
assertFalse(detector.empty());
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
Mat img = getTestImg();
|
||||
|
||||
|
||||
List<KeyPoint> keypoints1 = new ArrayList<KeyPoint>();
|
||||
detector.detect(img, keypoints1);
|
||||
|
||||
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\nmaxSize: 45\nresponseThreshold: 150\nlineThresholdProjected: 10\nlineThresholdBinarized: 8\nsuppressNonmaxSize: 5\n");
|
||||
detector.read(filename);
|
||||
|
||||
|
||||
List<KeyPoint> keypoints2 = new ArrayList<KeyPoint>();
|
||||
detector.detect(img, keypoints2);
|
||||
|
||||
|
||||
assertTrue(keypoints2.size() <= keypoints1.size());
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,11 @@ public class SURFDescriptorExtractorTest extends OpenCVTestCase {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCompute() {
|
||||
public void testComputeListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatListOfKeyPointMat() {
|
||||
KeyPoint point = new KeyPoint(55.775577545166016f, 44.224422454833984f, 16, 9.754629f, 8617.863f, 1, -1);
|
||||
List<KeyPoint> keypoints = Arrays.asList(point);
|
||||
Mat img = getTestImg();
|
||||
|
@ -17,23 +17,16 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class SURFFeatureDetectorTest extends OpenCVTestCase {
|
||||
|
||||
|
||||
FeatureDetector detector;
|
||||
KeyPoint[] truth;
|
||||
int matSize;
|
||||
KeyPoint[] truth;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
detector = FeatureDetector.create(FeatureDetector.SURF);
|
||||
|
||||
matSize = 100;
|
||||
|
||||
truth = new KeyPoint[] { new KeyPoint(55.775577545166016f, 44.224422454833984f, 16, 9.754629f, 8617.863f, 1, -1),
|
||||
new KeyPoint(44.224422454833984f, 44.224422454833984f, 16, 99.75463f, 8617.863f, 1, -1),
|
||||
new KeyPoint(44.224422454833984f, 55.775577545166016f, 16, 189.7546f, 8617.863f, 1, -1),
|
||||
new KeyPoint(55.775577545166016f, 55.775577545166016f, 16, 279.75464f, 8617.863f, 1, -1) };
|
||||
|
||||
super.setUp();
|
||||
private Mat getMaskImg() {
|
||||
Mat mask = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Mat right = mask.submat(0, matSize, matSize / 2, matSize);
|
||||
right.setTo(new Scalar(0));
|
||||
return mask;
|
||||
}
|
||||
|
||||
private Mat getTestImg() {
|
||||
@ -56,37 +49,55 @@ public class SURFFeatureDetectorTest extends OpenCVTestCase {
|
||||
});
|
||||
}
|
||||
|
||||
private Mat getMaskImg() {
|
||||
Mat mask = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
Mat right = mask.submat(0, matSize, matSize / 2, matSize);
|
||||
right.setTo(new Scalar(0));
|
||||
return mask;
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
detector = FeatureDetector.create(FeatureDetector.SURF);
|
||||
|
||||
matSize = 100;
|
||||
|
||||
truth = new KeyPoint[] { new KeyPoint(55.775577545166016f, 44.224422454833984f, 16, 9.754629f, 8617.863f, 1, -1),
|
||||
new KeyPoint(44.224422454833984f, 44.224422454833984f, 16, 99.75463f, 8617.863f, 1, -1),
|
||||
new KeyPoint(44.224422454833984f, 55.775577545166016f, 16, 189.7546f, 8617.863f, 1, -1),
|
||||
new KeyPoint(55.775577545166016f, 55.775577545166016f, 16, 279.75464f, 8617.863f, 1, -1) };
|
||||
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCreate() {
|
||||
assertNotNull(detector);
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\nhessianThreshold: 8000.\noctaves: 3\noctaveLayers: 4\nupright: 0\n");
|
||||
detector.read(filename);
|
||||
|
||||
Mat img = getTestImg();
|
||||
Mat mask = getMaskImg();
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
|
||||
detector.detect(img, keypoints, mask);
|
||||
|
||||
order(keypoints);
|
||||
assertListKeyPointEquals(Arrays.asList(truth[1], truth[2]), keypoints, EPS);
|
||||
List<List<KeyPoint>> keypoints = new ArrayList<List<KeyPoint>>();
|
||||
Mat cross = getTestImg();
|
||||
List<Mat> crosses = new ArrayList<Mat>(3);
|
||||
crosses.add(cross);
|
||||
crosses.add(cross);
|
||||
crosses.add(cross);
|
||||
|
||||
detector.detect(crosses, keypoints);
|
||||
|
||||
assertEquals(3, keypoints.size());
|
||||
|
||||
for (List<KeyPoint> lkp : keypoints) {
|
||||
order(lkp);
|
||||
assertListKeyPointEquals(Arrays.asList(truth), lkp, EPS);
|
||||
}
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPointListOfMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMatListOfKeyPoint() {
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\nhessianThreshold: 8000.\noctaves: 3\noctaveLayers: 4\nupright: 0\n");
|
||||
detector.read(filename);
|
||||
|
||||
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
Mat cross = getTestImg();
|
||||
|
||||
@ -96,27 +107,20 @@ public class SURFFeatureDetectorTest extends OpenCVTestCase {
|
||||
assertListKeyPointEquals(Arrays.asList(truth), keypoints, EPS);
|
||||
}
|
||||
|
||||
public void testDetectListOfMatListOfListOfKeyPoint() {
|
||||
public void testDetectMatListOfKeyPointMat() {
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\nhessianThreshold: 8000.\noctaves: 3\noctaveLayers: 4\nupright: 0\n");
|
||||
detector.read(filename);
|
||||
|
||||
List<List<KeyPoint>> keypoints = new ArrayList<List<KeyPoint>>();
|
||||
Mat cross = getTestImg();
|
||||
List<Mat> crosses = new ArrayList<Mat>(3);
|
||||
crosses.add(cross);
|
||||
crosses.add(cross);
|
||||
crosses.add(cross);
|
||||
|
||||
detector.detect(crosses, keypoints);
|
||||
|
||||
assertEquals(3, keypoints.size());
|
||||
Mat img = getTestImg();
|
||||
Mat mask = getMaskImg();
|
||||
List<KeyPoint> keypoints = new ArrayList<KeyPoint>();
|
||||
|
||||
for(List<KeyPoint> lkp : keypoints) {
|
||||
order(lkp);
|
||||
assertListKeyPointEquals(Arrays.asList(truth), lkp, EPS);
|
||||
}
|
||||
}
|
||||
detector.detect(img, keypoints, mask);
|
||||
|
||||
order(keypoints);
|
||||
assertListKeyPointEquals(Arrays.asList(truth[1], truth[2]), keypoints, EPS);
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
assertFalse(detector.empty());
|
||||
@ -124,17 +128,17 @@ public class SURFFeatureDetectorTest extends OpenCVTestCase {
|
||||
|
||||
public void testRead() {
|
||||
Mat cross = getTestImg();
|
||||
|
||||
|
||||
List<KeyPoint> keypoints1 = new ArrayList<KeyPoint>();
|
||||
detector.detect(cross, keypoints1);
|
||||
|
||||
|
||||
String filename = OpenCVTestRunner.getTempFileName("yml");
|
||||
writeFile(filename, "%YAML:1.0\nhessianThreshold: 8000.\noctaves: 3\noctaveLayers: 4\nupright: 0\n");
|
||||
detector.read(filename);
|
||||
|
||||
|
||||
List<KeyPoint> keypoints2 = new ArrayList<KeyPoint>();
|
||||
detector.detect(cross, keypoints2);
|
||||
|
||||
|
||||
assertTrue(keypoints2.size() <= keypoints1.size());
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,19 @@ import org.opencv.highgui.Highgui;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.test.OpenCVTestRunner;
|
||||
|
||||
public class highguiTest extends OpenCVTestCase {
|
||||
public class HighguiTest extends OpenCVTestCase {
|
||||
|
||||
public void testImdecode() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testImencodeStringMatListOfByte() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testImencodeStringMatListOfByteListOfInteger() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testImreadString() {
|
||||
dst = Highgui.imread(OpenCVTestRunner.LENA_PATH);
|
||||
@ -22,4 +34,12 @@ public class highguiTest extends OpenCVTestCase {
|
||||
assertTrue(512 == dst.rows());
|
||||
}
|
||||
|
||||
public void testImwriteStringMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testImwriteStringMatListOfInteger() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
package org.opencv.test.highgui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.core.Size;
|
||||
import org.opencv.highgui.Highgui;
|
||||
import org.opencv.highgui.VideoCapture;
|
||||
|
||||
@ -8,8 +11,8 @@ import org.opencv.test.OpenCVTestCase;
|
||||
public class VideoCaptureTest extends OpenCVTestCase {
|
||||
|
||||
private VideoCapture capture;
|
||||
private boolean isSucceed;
|
||||
private boolean isOpened;
|
||||
private boolean isSucceed;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
@ -20,15 +23,27 @@ public class VideoCaptureTest extends OpenCVTestCase {
|
||||
isOpened = false;
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("HIGHGUI.VideoCapture");
|
||||
public void testGet() {
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
double frameWidth = capture.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);
|
||||
assertTrue(0 != frameWidth);
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testGet() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
double frameWidth = capture.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);
|
||||
capture.release();
|
||||
assertTrue(0 != frameWidth);
|
||||
public void testGetSupportedPreviewSizes() {
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
List<Size> sizes = capture.getSupportedPreviewSizes();
|
||||
assertNotNull(sizes);
|
||||
assertFalse(sizes.isEmpty());
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testGrab() {
|
||||
@ -38,10 +53,13 @@ public class VideoCaptureTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testGrabFromRealCamera() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isSucceed = capture.grab();
|
||||
capture.release();
|
||||
assertTrue(isSucceed);
|
||||
try {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isSucceed = capture.grab();
|
||||
assertTrue(isSucceed);
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testIsOpened() {
|
||||
@ -50,76 +68,110 @@ public class VideoCaptureTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testIsOpenedRealCamera() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
assertTrue(isOpened);
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testOpen() {
|
||||
capture = new VideoCapture();
|
||||
capture.open(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture();
|
||||
capture.open(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
assertTrue(isOpened);
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testRead() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isSucceed = capture.read(dst);
|
||||
capture.release();
|
||||
assertTrue(isSucceed);
|
||||
assertFalse(dst.empty());
|
||||
assertEquals(3, dst.channels());
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isSucceed = capture.read(dst);
|
||||
assertTrue(isSucceed);
|
||||
assertFalse(dst.empty());
|
||||
assertEquals(3, dst.channels());
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testRelease() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.release();
|
||||
assertFalse(capture.isOpened());
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.release();
|
||||
assertFalse(capture.isOpened());
|
||||
capture = null;
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testRetrieveMat() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.grab();
|
||||
isSucceed = capture.retrieve(dst);
|
||||
capture.release();
|
||||
assertTrue(isSucceed);
|
||||
assertFalse(dst.empty());
|
||||
assertEquals(3, dst.channels());
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.grab();
|
||||
isSucceed = capture.retrieve(dst);
|
||||
assertTrue(isSucceed);
|
||||
assertFalse(dst.empty());
|
||||
assertEquals(3, dst.channels());
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testRetrieveMatInt() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.grab();
|
||||
isSucceed = capture.retrieve(dst, 1);
|
||||
capture.release();
|
||||
assertTrue(isSucceed);
|
||||
assertFalse(dst.empty());
|
||||
// OpenCVTestRunner.Log(dst.toString());
|
||||
assertEquals(1, dst.channels());
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.grab();
|
||||
isSucceed = capture.retrieve(dst, Highgui.CV_CAP_ANDROID_GREY_FRAME);
|
||||
assertTrue(isSucceed);
|
||||
assertFalse(dst.empty());
|
||||
assertEquals(1, dst.channels());
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, 640.0);
|
||||
double frameWidth = capture.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);
|
||||
capture.read(dst);
|
||||
capture.release();
|
||||
assertEquals(640.0, frameWidth);
|
||||
assertEquals(640, dst.cols());
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, 640);
|
||||
capture.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, 480);
|
||||
double frameWidth = capture.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);
|
||||
capture.read(dst);
|
||||
assertEquals(640.0, frameWidth);
|
||||
assertEquals(640, dst.cols());
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
|
||||
public void testVideoCapture() {
|
||||
capture = new VideoCapture();
|
||||
assertTrue(null != capture);
|
||||
assertNotNull(capture);
|
||||
assertFalse(capture.isOpened());
|
||||
}
|
||||
|
||||
public void testVideoCaptureInt() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
assertTrue(null != capture);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
try
|
||||
{
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
assertNotNull(capture);
|
||||
assertTrue(capture.isOpened());
|
||||
} finally {
|
||||
if (capture != null) capture.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,14 +15,13 @@ import org.opencv.core.TermCriteria;
|
||||
import org.opencv.imgproc.Imgproc;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class ImgprocTest extends OpenCVTestCase {
|
||||
|
||||
public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
private Mat gray_64f_2;
|
||||
private Mat dst64F;
|
||||
private Mat mask;
|
||||
private int imgprocSz;
|
||||
Point anchorPoint;
|
||||
private Mat dst64F;
|
||||
private Mat gray_64f_2;
|
||||
private int imgprocSz;
|
||||
private Mat mask;
|
||||
Size size;
|
||||
|
||||
@Override
|
||||
@ -38,10 +37,6 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
size = new Size(3, 3);
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("imgproc");
|
||||
}
|
||||
|
||||
public void testAccumulateMatMat() {
|
||||
Imgproc.accumulate(gray_64f_2, dst64F);
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_64F, new Scalar(2));
|
||||
@ -481,45 +476,44 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat src = new Mat(imgprocSz, imgprocSz, CvType.CV_32FC1);
|
||||
src.put(0, 0, 1, 2);
|
||||
src.put(1, 0, 2, 1);
|
||||
|
||||
int blockSize = 5;
|
||||
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_32FC1, new Scalar(0));
|
||||
Imgproc.cornerMinEigenVal(src, dst, blockSize);
|
||||
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_32FC1, new Scalar(0));
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
|
||||
Mat truth1 = new Mat(matSize, matSize, CvType.CV_32FC1, new Scalar(0));
|
||||
Imgproc.cornerMinEigenVal(gray255, dst, blockSize);
|
||||
assertMatEqual(truth1, dst, EPS);
|
||||
|
||||
truth = new Mat(matSize, matSize, CvType.CV_32FC1, new Scalar(0));
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testCornerMinEigenValMatMatIntInt() {
|
||||
Mat src = Mat.eye(3, 3, CvType.CV_32FC1);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_32FC1, new Scalar(0));
|
||||
int blockSize = 3;
|
||||
int ksize = 5;
|
||||
|
||||
Imgproc.cornerMinEigenVal(src, dst, blockSize, ksize);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_32FC1, new Scalar(0));
|
||||
truth.put(0, 0, 0.055555549, 0.027777772, 0.055555549);
|
||||
truth.put(1, 0, 0.027777772, 0.055555549, 0.027777772);
|
||||
truth.put(2, 0, 0.055555549, 0.027777772, 0.055555549);
|
||||
|
||||
Imgproc.cornerMinEigenVal(src, dst, blockSize, ksize);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testCornerMinEigenValMatMatIntIntInt() {
|
||||
Mat src = Mat.eye(3, 3, CvType.CV_32FC1);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_32FC1, new Scalar(0));
|
||||
int blockSize = 3;
|
||||
int ksize = 5;
|
||||
|
||||
Imgproc.cornerMinEigenVal(src, dst, blockSize, ksize, Imgproc.BORDER_REFLECT);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_32FC1, new Scalar(0));
|
||||
truth.put(0, 0, 0.68055558, 0.92708349, 0.5868057);
|
||||
truth.put(1, 0, 0.92708343, 0.92708343, 0.92708343);
|
||||
truth.put(2, 0, 0.58680564, 0.92708343, 0.68055564);
|
||||
|
||||
Imgproc.cornerMinEigenVal(src, dst, blockSize, ksize, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -529,14 +523,14 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Point truthPosition = new Point(img.cols() / 2, img.rows() / 2);
|
||||
|
||||
Rect r = new Rect(new Point(0, 0), truthPosition);
|
||||
Core.rectangle(img, r.tl(), r.br(), new Scalar(0), -1 /*TODO: CV_FILLED*/);
|
||||
Core.rectangle(img, r.tl(), r.br(), new Scalar(0), -1 /* TODO: CV_FILLED */);
|
||||
|
||||
List<Point> corners = new ArrayList<Point>();
|
||||
corners.add(new Point(truthPosition.x + 1, truthPosition.y + 1));
|
||||
|
||||
Size winSize = new Size(2, 2);
|
||||
Size zeroZone = new Size(-1, -1);
|
||||
TermCriteria criteria = new TermCriteria(2 /*TODO: CV_TERMCRIT_EPS*/, 0, 0.01);
|
||||
TermCriteria criteria = new TermCriteria(2 /* TODO: CV_TERMCRIT_EPS */, 0, 0.01);
|
||||
|
||||
Imgproc.cornerSubPix(img, corners, winSize, zeroZone, criteria);
|
||||
assertPointEquals(truthPosition, corners.get(0), weakEPS);
|
||||
@ -558,6 +552,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
assertMatEqual(gray255, dst);
|
||||
|
||||
Imgproc.dilate(gray1, dst, kernel);
|
||||
|
||||
assertMatEqual(gray1, dst);
|
||||
}
|
||||
|
||||
@ -565,6 +560,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.dilate(gray255, dst, kernel, anchorPoint);
|
||||
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
@ -572,6 +568,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.dilate(gray255, dst, kernel, anchorPoint, 10);
|
||||
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
@ -579,6 +576,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.dilate(gray255, dst, kernel, anchorPoint, 10, Imgproc.BORDER_REFLECT);
|
||||
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
@ -587,15 +585,17 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Scalar value = new Scalar(0);
|
||||
|
||||
Imgproc.dilate(gray255, dst, kernel, anchorPoint, 10, Imgproc.BORDER_REFLECT, value);
|
||||
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
public void testDistanceTransform() {
|
||||
truth = new Mat(matSize, matSize, CvType.CV_32FC1, new Scalar(8192));
|
||||
Mat dstLables = new Mat(matSize, matSize, CvType.CV_32SC1, new Scalar(0));
|
||||
|
||||
Mat labels = new Mat();
|
||||
|
||||
Imgproc.distanceTransform(gray128, dst, labels, Imgproc.CV_DIST_L2, 3);
|
||||
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
assertMatEqual(dstLables, labels);
|
||||
}
|
||||
@ -606,9 +606,10 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Core.rectangle(gray0, new Point(1, 2), new Point(7, 8), new Scalar(100));
|
||||
Imgproc.findContours(gray0, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
|
||||
assertTrue(1 == contours.size());
|
||||
|
||||
assertFalse(0 == Core.countNonZero(gray0));
|
||||
|
||||
Imgproc.drawContours(gray0, contours, -1, new Scalar(0));
|
||||
|
||||
assertTrue(0 == Core.countNonZero(gray0));
|
||||
}
|
||||
|
||||
@ -642,7 +643,9 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
public void testErodeMatMatMat() {
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.erode(gray128, dst, kernel);
|
||||
|
||||
assertMatEqual(gray128, dst);
|
||||
}
|
||||
|
||||
@ -651,11 +654,11 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
src.put(0, 0, 1, 4, 8);
|
||||
src.put(1, 0, 2, 0, 1);
|
||||
src.put(2, 0, 3, 4, 6);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(0.0));
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.erode(src, dst, kernel, anchorPoint);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(0.0));
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
@ -664,11 +667,11 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
src.put(0, 0, 15, 9, 10);
|
||||
src.put(1, 0, 10, 8, 12);
|
||||
src.put(2, 0, 12, 20, 25);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(8.0));
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.erode(src, dst, kernel, anchorPoint, 10);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(8.0));
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
@ -677,11 +680,11 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
src.put(0, 0, 15, 9, 10);
|
||||
src.put(1, 0, 10, 8, 12);
|
||||
src.put(2, 0, 12, 20, 25);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(8.0));
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.erode(src, dst, kernel, anchorPoint, 10, Imgproc.BORDER_REFLECT);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(8.0));
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
@ -690,12 +693,12 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
src.put(0, 0, 15, 9, 10);
|
||||
src.put(1, 0, 10, 8, 12);
|
||||
src.put(2, 0, 12, 20, 25);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(8.0));
|
||||
Mat kernel = new Mat();
|
||||
Scalar sc = new Scalar(3, 3);
|
||||
|
||||
Imgproc.erode(src, dst, kernel, anchorPoint, 10, Imgproc.BORDER_REFLECT, sc);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(8.0));
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
@ -703,13 +706,13 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat src = Mat.eye(4, 4, CvType.CV_32F);
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(1.0));
|
||||
|
||||
truth = Mat.eye(4, 4, CvType.CV_32F);
|
||||
Imgproc.filter2D(src, dst, -1, kernel);
|
||||
|
||||
truth = new Mat(4, 4, CvType.CV_32F);
|
||||
truth.put(0, 0, 2, 2, 1, 0);
|
||||
truth.put(1, 0, 2, 2, 1, 0);
|
||||
truth.put(2, 0, 1, 1, 2, 1);
|
||||
truth.put(3, 0, 0, 0, 1, 2);
|
||||
|
||||
Imgproc.filter2D(src, dst, -1, kernel);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -718,14 +721,20 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Point point = new Point(0, 0);
|
||||
|
||||
Imgproc.filter2D(gray128, dst, -1, kernel, point);
|
||||
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
public void testFilter2DMatMatIntMatPointDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFilter2DMatMatIntMatPointDoubleInt() {
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(0.0));
|
||||
Point point = new Point(0, 0);
|
||||
|
||||
Imgproc.filter2D(gray128, dst, -1, kernel, point, 2.0, Imgproc.BORDER_CONSTANT);
|
||||
|
||||
assertMatEqual(gray2, dst);
|
||||
}
|
||||
|
||||
@ -735,6 +744,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat hierarchy = dst;
|
||||
|
||||
Imgproc.findContours(img, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
|
||||
|
||||
// no contours on empty image
|
||||
assertEquals(contours.size(), 0);
|
||||
assertEquals(contours.size(), hierarchy.total());
|
||||
@ -743,6 +753,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Core.rectangle(img, new Point(30, 35), new Point(40, 45), new Scalar(200));
|
||||
|
||||
Imgproc.findContours(img, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
|
||||
|
||||
// two contours of two rectangles
|
||||
assertEquals(contours.size(), 2);
|
||||
assertEquals(contours.size(), hierarchy.total());
|
||||
@ -767,14 +778,15 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
public void testFitEllipse() {
|
||||
List<Point> points = new ArrayList<Point>();
|
||||
points.add(new Point( 0, 0));
|
||||
points.add(new Point(-1, 1));
|
||||
points.add(new Point( 1, 1));
|
||||
points.add(new Point( 1, -1));
|
||||
points.add(new Point(0, 0));
|
||||
points.add(new Point(-1, 1));
|
||||
points.add(new Point(1, 1));
|
||||
points.add(new Point(1, -1));
|
||||
points.add(new Point(-1, -1));
|
||||
|
||||
RotatedRect rrect = new RotatedRect();
|
||||
|
||||
rrect = Imgproc.fitEllipse(points);
|
||||
|
||||
assertEquals(0.0, rrect.center.x);
|
||||
assertEquals(0.0, rrect.center.y);
|
||||
assertEquals(2.53, rrect.size.width, EPS);
|
||||
@ -789,39 +801,31 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
linePoints.put(0, 0, 0.53196341, 0.84676737, 2.496531, 3.7467217);
|
||||
|
||||
Imgproc.fitLine(points, dst, Imgproc.CV_DIST_L12, 0, 0.01, 0.01);
|
||||
|
||||
assertMatEqual(linePoints, dst, EPS);
|
||||
}
|
||||
|
||||
public void testFloodFillMatMatPointScalar() {
|
||||
Mat mask = new Mat(matSize + 2, matSize + 2, CvType.CV_8U);
|
||||
Mat mask = new Mat(matSize + 2, matSize + 2, CvType.CV_8U, new Scalar(0));
|
||||
Mat img = gray0;
|
||||
|
||||
img.setTo(new Scalar(0));
|
||||
mask.setTo(new Scalar(0));
|
||||
|
||||
Core.circle(mask, new Point(matSize / 2 + 1, matSize / 2 + 1), 3, new Scalar(2));
|
||||
|
||||
int retval = Imgproc.floodFill(img, mask, new Point(matSize / 2, matSize / 2), new Scalar(1));
|
||||
|
||||
assertEquals(Core.countNonZero(img), retval);
|
||||
|
||||
Core.circle(mask, new Point(matSize / 2 + 1, matSize / 2 + 1), 3, new Scalar(0));
|
||||
|
||||
assertEquals(retval + 4 * (matSize + 1), Core.countNonZero(mask));
|
||||
|
||||
assertMatEqual(mask.submat(1, matSize + 1, 1, matSize + 1), img);
|
||||
}
|
||||
|
||||
public void testFloodFillMatMatPointScalar_WithoutMask() {
|
||||
Mat img = gray0;
|
||||
|
||||
Core.circle(img, new Point(matSize / 2, matSize / 2), 3, new Scalar(2));
|
||||
|
||||
// TODO: ideally we should pass null instead of "new Mat()"
|
||||
int retval = Imgproc.floodFill(img, new Mat(), new Point(matSize / 2, matSize / 2), new Scalar(1));
|
||||
|
||||
Core.circle(img, new Point(matSize / 2, matSize / 2), 3, new Scalar(0));
|
||||
|
||||
assertEquals(Core.countNonZero(img), retval);
|
||||
}
|
||||
|
||||
@ -847,16 +851,17 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
Imgproc.GaussianBlur(gray2, dst, size, 1.0);
|
||||
assertMatEqual(gray2, dst);
|
||||
|
||||
}
|
||||
|
||||
public void testGaussianBlurMatMatSizeDoubleDouble() {
|
||||
Imgproc.GaussianBlur(gray2, dst, size, 0.0, 0.0);
|
||||
|
||||
assertMatEqual(gray2, dst);
|
||||
}
|
||||
|
||||
public void testGaussianBlurMatMatSizeDoubleDoubleInt() {
|
||||
Imgproc.GaussianBlur(gray2, dst, size, 1.0, 3.0, Imgproc.BORDER_REFLECT);
|
||||
|
||||
assertMatEqual(gray2, dst);
|
||||
}
|
||||
|
||||
@ -865,27 +870,24 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testGetDefaultNewCameraMatrixMat() {
|
||||
truth = new Mat();
|
||||
Mat mtx = Imgproc.getDefaultNewCameraMatrix(gray0);
|
||||
|
||||
truth = Imgproc.getDefaultNewCameraMatrix(gray0);
|
||||
assertTrue(0 == Core.countNonZero(truth));
|
||||
assertFalse(truth.empty());
|
||||
assertFalse(mtx.empty());
|
||||
assertEquals(0, Core.countNonZero(mtx));
|
||||
}
|
||||
|
||||
public void testGetDefaultNewCameraMatrixMatSize() {
|
||||
truth = new Mat();
|
||||
Mat mtx = Imgproc.getDefaultNewCameraMatrix(gray0, size);
|
||||
|
||||
truth = Imgproc.getDefaultNewCameraMatrix(gray0, size);
|
||||
assertTrue(0 == Core.countNonZero(truth));
|
||||
assertFalse(truth.empty());
|
||||
assertFalse(mtx.empty());
|
||||
assertEquals(0, Core.countNonZero(mtx));
|
||||
}
|
||||
|
||||
public void testGetDefaultNewCameraMatrixMatSizeBoolean() {
|
||||
truth = new Mat();
|
||||
Mat mtx = Imgproc.getDefaultNewCameraMatrix(gray0, size, true);
|
||||
|
||||
truth = Imgproc.getDefaultNewCameraMatrix(gray0, size, true);
|
||||
assertTrue(0 != Core.countNonZero(truth));
|
||||
assertFalse(truth.empty());
|
||||
assertFalse(mtx.empty());
|
||||
assertFalse(0 == Core.countNonZero(mtx));
|
||||
}
|
||||
|
||||
public void testGetDerivKernelsMatMatIntIntInt() {
|
||||
@ -952,6 +954,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth = new Mat(1, 1, CvType.CV_64FC1, new Scalar(1.0));
|
||||
|
||||
dst = Imgproc.getGaussianKernel(1, 0.5);
|
||||
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -960,15 +963,21 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(0, 0, 0.23899426, 0.52201146, 0.23899426);
|
||||
|
||||
dst = Imgproc.getGaussianKernel(3, 0.8, CvType.CV_32F);
|
||||
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testGetPerspectiveTransform() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetRectSubPixMatSizePointMat() {
|
||||
truth = new Mat(3, 3, CvType.CV_8U, new Scalar(255));
|
||||
Size size = new Size(3, 3);
|
||||
Point center = new Point(gray255.cols() / 2, gray255.rows() / 2);
|
||||
|
||||
Imgproc.getRectSubPix(gray255, size, center, dst);
|
||||
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
@ -1009,7 +1018,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDouble() {
|
||||
public void testGoodFeaturesToTrackMatListOfPointIntDoubleDouble() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
@ -1019,7 +1028,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
assertEquals(4, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMat() {
|
||||
public void testGoodFeaturesToTrackMatListOfPointIntDoubleDoubleMat() {
|
||||
Mat src = gray128;
|
||||
Point tl = new Point(2, 2);
|
||||
Point br = new Point(8, 8);
|
||||
@ -1034,7 +1043,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
assertEquals(1, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMatInt() {
|
||||
public void testGoodFeaturesToTrackMatListOfPointIntDoubleDoubleMatInt() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
@ -1044,7 +1053,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
assertEquals(4, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMatIntBoolean() {
|
||||
public void testGoodFeaturesToTrackMatListOfPointIntDoubleDoubleMatIntBoolean() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
@ -1054,7 +1063,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
assertEquals(4, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMatIntBooleanDouble() {
|
||||
public void testGoodFeaturesToTrackMatListOfPointIntDoubleDoubleMatIntBooleanDouble() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
@ -1418,7 +1427,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
points.add(new Point(0, 1));
|
||||
|
||||
Point actualCenter = new Point();
|
||||
float[] radius = new float[]{347.0f};
|
||||
float[] radius = new float[] { 347.0f };
|
||||
Imgproc.minEnclosingCircle(points, actualCenter, radius);
|
||||
|
||||
Point truthCenter = new Point(0, 0);
|
||||
@ -1526,6 +1535,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
int ksize = 3;
|
||||
|
||||
Imgproc.preCornerDetect(src, dst, ksize, Imgproc.BORDER_REFLECT);
|
||||
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
@ -4,10 +4,6 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class MomentsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_m00() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
@ -1,71 +1,69 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvANN_MLPTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLP() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvANN_MLP;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvANN_MLPTest extends TestCase {
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLP() {
|
||||
new CvANN_MLP();
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,75 +1,77 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvANN_MLP_TrainParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_bp_dw_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_bp_moment_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_max() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_min() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_minus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_plus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_train_method() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_bp_dw_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_bp_moment_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_max() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_min() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_minus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_plus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_train_method() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvANN_MLP_TrainParams;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvANN_MLP_TrainParamsTest extends TestCase {
|
||||
|
||||
public void testCvANN_MLP_TrainParams() {
|
||||
new CvANN_MLP_TrainParams();
|
||||
}
|
||||
|
||||
public void testGet_bp_dw_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_bp_moment_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_max() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_min() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_minus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_plus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_train_method() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_bp_dw_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_bp_moment_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_max() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_min() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_minus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_plus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_train_method() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,43 +1,45 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvBoostParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_boost_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_split_criteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weight_trim_rate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_boost_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_split_criteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weight_trim_rate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvBoostParams;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvBoostParamsTest extends TestCase {
|
||||
|
||||
public void testCvBoostParams() {
|
||||
new CvBoostParams();
|
||||
}
|
||||
|
||||
public void testGet_boost_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_split_criteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weight_trim_rate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_boost_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_split_criteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weight_trim_rate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,95 +1,93 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvBoostTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoost() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeBooleanBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPrune() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvBoost;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvBoostTest extends TestCase {
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoost() {
|
||||
new CvBoost();
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeBooleanBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPrune() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,75 +1,77 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvDTreeParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_cv_folds() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_max_categories() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_max_depth() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_min_sample_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_regression_accuracy() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_truncate_pruned_tree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_use_1se_rule() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_use_surrogates() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_cv_folds() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_categories() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_depth() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_min_sample_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_regression_accuracy() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_truncate_pruned_tree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_use_1se_rule() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_use_surrogates() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvDTreeParams;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvDTreeParamsTest extends TestCase {
|
||||
|
||||
public void testCvDTreeParams() {
|
||||
new CvDTreeParams();
|
||||
}
|
||||
|
||||
public void testGet_cv_folds() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_max_categories() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_max_depth() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_min_sample_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_regression_accuracy() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_truncate_pruned_tree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_use_1se_rule() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_use_surrogates() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_cv_folds() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_categories() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_depth() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_min_sample_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_regression_accuracy() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_truncate_pruned_tree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_use_1se_rule() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_use_surrogates() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,47 +1,45 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvDTreeTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvDTree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvDTreeParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvDTree;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvDTreeTest extends TestCase {
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvDTree() {
|
||||
new CvDTree();
|
||||
}
|
||||
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvDTreeParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,35 +1,37 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvEMParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_cov_mat_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_start_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_cov_mat_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_start_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvEMParams;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvEMParamsTest extends TestCase {
|
||||
|
||||
public void testCvEMParams() {
|
||||
new CvEMParams();
|
||||
}
|
||||
|
||||
public void testGet_cov_mat_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_start_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_cov_mat_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_start_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,87 +1,85 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvEMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCalcLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetCovs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetLikelihoodDelta() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetMeans() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetNClusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetProbs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetWeights() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatCvEMParamsMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvEM;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvEMTest extends TestCase {
|
||||
|
||||
public void testCalcLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEM() {
|
||||
new CvEM();
|
||||
}
|
||||
|
||||
public void testCvEMMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetCovs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetLikelihoodDelta() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetMeans() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetNClusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetProbs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetWeights() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatCvEMParamsMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,39 +1,37 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvERTreesTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCvERTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvERTrees;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvERTreesTest extends TestCase {
|
||||
|
||||
public void testCvERTrees() {
|
||||
new CvERTrees();
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,43 +1,45 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvGBTreesParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_loss_function_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_loss_function_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvGBTreesParams;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvGBTreesParamsTest extends TestCase {
|
||||
|
||||
public void testCvGBTreesParams() {
|
||||
new CvGBTreesParams();
|
||||
}
|
||||
|
||||
public void testGet_loss_function_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_loss_function_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,87 +1,85 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvGBTreesTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvGBTrees;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvGBTreesTest extends TestCase {
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTrees() {
|
||||
new CvGBTrees();
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,55 +1,53 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvKNearestTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCvKNearest() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFind_nearest() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBooleanIntBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvKNearest;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvKNearestTest extends TestCase {
|
||||
|
||||
public void testCvKNearest() {
|
||||
new CvKNearest();
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFind_nearest() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBooleanIntBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,55 +1,53 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvNormalBayesClassifierTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifier() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvNormalBayesClassifier;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvNormalBayesClassifierTest extends TestCase {
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifier() {
|
||||
new CvNormalBayesClassifier();
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,35 +1,37 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvParamGridTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_max_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_min_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_min_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvParamGrid;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvParamGridTest extends TestCase {
|
||||
|
||||
public void testCvParamGrid() {
|
||||
new CvParamGrid();
|
||||
}
|
||||
|
||||
public void testGet_max_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_min_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_min_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,27 +1,29 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvRTParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_calc_var_importance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nactive_vars() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_calc_var_importance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nactive_vars() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvRTParams;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvRTParamsTest extends TestCase {
|
||||
|
||||
public void testCvRTParams() {
|
||||
new CvRTParams();
|
||||
}
|
||||
|
||||
public void testGet_calc_var_importance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nactive_vars() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_calc_var_importance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nactive_vars() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,63 +1,61 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvRTreesTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvRTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict_probMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict_probMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvRTrees;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvRTreesTest extends TestCase {
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvRTrees() {
|
||||
new CvRTrees();
|
||||
}
|
||||
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict_probMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict_probMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,75 +1,77 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvSVMParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvSVMParams;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvSVMParamsTest extends TestCase {
|
||||
|
||||
public void testCvSVMParams() {
|
||||
new CvSVMParams();
|
||||
}
|
||||
|
||||
public void testGet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,103 +1,101 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvSVMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_support_vector_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_var_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvSVM;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvSVMTest extends TestCase {
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVM() {
|
||||
new CvSVM();
|
||||
}
|
||||
|
||||
public void testCvSVMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_support_vector_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_var_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,27 +1,29 @@
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvStatModelTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testLoadString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testLoadStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSaveString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSaveStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.ml;
|
||||
|
||||
import org.opencv.ml.CvStatModel;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class CvStatModelTest extends TestCase {
|
||||
|
||||
public void testCvStatModel() {
|
||||
new CvStatModel();
|
||||
}
|
||||
|
||||
public void testLoadString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testLoadStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSaveString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSaveStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,10 +5,6 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class HOGDescriptorTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCheckDetectorSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@ -173,6 +169,10 @@ public class HOGDescriptorTest extends OpenCVTestCase {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_svmDetector() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_winSigma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import org.opencv.core.Rect;
|
||||
import org.opencv.objdetect.Objdetect;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class objdetectTest extends OpenCVTestCase {
|
||||
public class ObjdetectTest extends OpenCVTestCase {
|
||||
|
||||
public void testGroupRectanglesListOfRectInt() {
|
||||
Rect r = new Rect(10, 10, 20, 20);
|
||||
@ -36,6 +36,10 @@ public class objdetectTest extends OpenCVTestCase {
|
||||
assertEquals(2, rects.size());
|
||||
}
|
||||
|
||||
public void testGroupRectanglesListOfRectIntDoubleListOfIntegerListOfDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGroupRectanglesListOfRectListOfIntegerInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
@ -1,189 +1,294 @@
|
||||
package org.opencv.test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.utils.Converters;
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Rect;
|
||||
import org.opencv.features2d.KeyPoint;
|
||||
|
||||
public class ConvertersTest extends OpenCVTestCase {
|
||||
|
||||
public void testMat_to_vector_float() {
|
||||
Mat src = new Mat(4, 1, CvType.CV_32FC1);
|
||||
src.put(0, 0, 2, 4, 3, 9);
|
||||
List<Float> fs = new ArrayList<Float>();
|
||||
|
||||
Converters.Mat_to_vector_float(src, fs);
|
||||
List<Float> truth = new ArrayList<Float>();
|
||||
truth.add(2.0f);
|
||||
truth.add(4.0f);
|
||||
truth.add(3.0f);
|
||||
truth.add(9.0f);
|
||||
assertListFloatEquals(truth, fs, EPS);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_int() {
|
||||
Mat src = new Mat(4, 1, CvType.CV_32SC1);
|
||||
src.put(0, 0, 2, 4, 3, 9);
|
||||
List<Integer> fs = new ArrayList<Integer>();
|
||||
|
||||
Converters.Mat_to_vector_int(src, fs);
|
||||
List<Integer> truth = new ArrayList<Integer>();
|
||||
truth.add(2);
|
||||
truth.add(4);
|
||||
truth.add(3);
|
||||
truth.add(9);
|
||||
assertListIntegerEquals(truth, fs);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_KeyPoint() {
|
||||
Mat src = new Mat(1, 1, CvType.CV_64FC(7));
|
||||
src.put(0, 0, 2, 4, 3, 9, 10, 12, 7);
|
||||
List<KeyPoint> kps = new ArrayList<KeyPoint>();
|
||||
|
||||
Converters.Mat_to_vector_KeyPoint(src, kps);
|
||||
List<KeyPoint> truth = new ArrayList<KeyPoint>();
|
||||
truth.add(new KeyPoint(2, 4, 3, 9, 10, 12, 7));
|
||||
assertListKeyPointEquals(truth, kps, EPS);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Mat() {
|
||||
//Mat src = new Mat(4, 1, CvType.CV_32SC2);
|
||||
//src.put(0, 0, 2, 2, 3, 3, 4, 4, 5, 5);
|
||||
//
|
||||
//List<Mat> mats = new ArrayList<Mat>();
|
||||
//Converters.Mat_to_vector_Mat(src, mats);
|
||||
//
|
||||
//List<Mat> truth = new ArrayList<Mat>();
|
||||
//truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
//truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(3.0)));
|
||||
//truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(4.0)));
|
||||
//truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(5.0)));
|
||||
//assertListEqualMat(truth, mats, EPS);
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point() {
|
||||
Mat src = new Mat(4, 1, CvType.CV_32SC2);
|
||||
src.put(0, 0, 2, 4, 3, 9, 10, 4, 35, 54);
|
||||
List<Point> points = new ArrayList<Point>();
|
||||
|
||||
Converters.Mat_to_vector_Point(src, points);
|
||||
List<Point> truth = new ArrayList<Point>();
|
||||
truth.add(new Point(2, 4));
|
||||
truth.add(new Point(3, 9));
|
||||
truth.add(new Point(10, 4));
|
||||
truth.add(new Point(35, 54));
|
||||
assertListPointEquals(truth, points, EPS);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Rect() {
|
||||
Mat src = new Mat(2, 1, CvType.CV_32SC4);
|
||||
src.put(0, 0, 2, 2, 5, 2, 0, 0, 6, 4);
|
||||
List<Rect> rectangles = new ArrayList<Rect>();
|
||||
|
||||
Converters.Mat_to_vector_Rect(src, rectangles);
|
||||
List<Rect> truth = new ArrayList<Rect>();
|
||||
truth.add(new Rect(2, 2, 5, 2));
|
||||
truth.add(new Rect(0, 0, 6, 4));
|
||||
assertListRectEquals(truth, rectangles);
|
||||
}
|
||||
|
||||
public void testVector_double_to_Mat() {
|
||||
List<Double> inputVector = new ArrayList<Double>();
|
||||
inputVector.add(2.0);
|
||||
inputVector.add(4.0);
|
||||
inputVector.add(3.0);
|
||||
inputVector.add(9.0);
|
||||
|
||||
dst = Converters.vector_double_to_Mat(inputVector);
|
||||
truth = new Mat(4, 1, CvType.CV_64FC1);
|
||||
truth.put(0, 0, 2, 4, 3, 9);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testVector_float_to_Mat() {
|
||||
List<Float> inputVector = new ArrayList<Float>();
|
||||
inputVector.add(2.0f);
|
||||
inputVector.add(4.0f);
|
||||
inputVector.add(3.0f);
|
||||
inputVector.add(9.0f);
|
||||
|
||||
dst = Converters.vector_float_to_Mat(inputVector);
|
||||
truth = new Mat(4, 1, CvType.CV_32FC1);
|
||||
truth.put(0, 0, 2, 4, 3, 9);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testVector_int_to_Mat() {
|
||||
List<Integer> inputVector = new ArrayList<Integer>();
|
||||
inputVector.add(2);
|
||||
inputVector.add(4);
|
||||
inputVector.add(3);
|
||||
inputVector.add(9);
|
||||
|
||||
dst = Converters.vector_int_to_Mat(inputVector);
|
||||
truth = new Mat(4, 1, CvType.CV_32SC1);
|
||||
truth.put(0, 0, 2, 4, 3, 9);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testVector_Mat_to_Mat() {
|
||||
//List<Mat> mats = new ArrayList<Mat>();
|
||||
//mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
//mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
//mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
//mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
//mats.add(gray0);
|
||||
//mats.add(gray255);
|
||||
//
|
||||
//dst = Converters.vector_Mat_to_Mat(mats);
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point_to_Mat() {
|
||||
List<Point> points = new ArrayList<Point>();
|
||||
points.add(new Point(2, 4));
|
||||
points.add(new Point(3, 9));
|
||||
points.add(new Point(10, 4));
|
||||
points.add(new Point(35, 54));
|
||||
|
||||
dst = Converters.vector_Point_to_Mat(points);
|
||||
truth = new Mat(4, 1, CvType.CV_32SC2);
|
||||
truth.put(0, 0, 2, 4, 3, 9, 10, 4, 35, 54);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testVector_Rect_to_Mat() {
|
||||
List<Rect> rectangles = new ArrayList<Rect>();
|
||||
rectangles.add(new Rect(2, 2, 5, 2));
|
||||
rectangles.add(new Rect(0, 0, 6, 4));
|
||||
|
||||
dst = Converters.vector_Rect_to_Mat(rectangles);
|
||||
truth = new Mat(2, 1, CvType.CV_32SC4);
|
||||
truth.put(0, 0, 2, 2, 5, 2, 0, 0, 6, 4);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testVector_uchar_to_Mat() {
|
||||
List<Byte> bytes = new ArrayList<Byte>();
|
||||
byte value1 = 1;
|
||||
byte value2 = 2;
|
||||
byte value3 = 3;
|
||||
byte value4 = 4;
|
||||
bytes.add(new Byte(value1));
|
||||
bytes.add(new Byte(value2));
|
||||
bytes.add(new Byte(value3));
|
||||
bytes.add(new Byte(value4));
|
||||
|
||||
dst = Converters.vector_uchar_to_Mat(bytes);
|
||||
truth = new Mat(4, 1, CvType.CV_8UC1);
|
||||
truth.put(0, 0, 1, 2, 3, 4);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
}
|
||||
package org.opencv.test.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Rect;
|
||||
import org.opencv.features2d.KeyPoint;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.utils.Converters;
|
||||
|
||||
public class ConvertersTest extends OpenCVTestCase {
|
||||
|
||||
public void testMat_to_vector_char() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_DMatch() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_float() {
|
||||
Mat src = new Mat(4, 1, CvType.CV_32FC1);
|
||||
src.put(0, 0, 2, 4, 3, 9);
|
||||
List<Float> fs = new ArrayList<Float>();
|
||||
|
||||
Converters.Mat_to_vector_float(src, fs);
|
||||
List<Float> truth = new ArrayList<Float>();
|
||||
truth.add(2.0f);
|
||||
truth.add(4.0f);
|
||||
truth.add(3.0f);
|
||||
truth.add(9.0f);
|
||||
assertListEquals(truth, fs, EPS);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_int() {
|
||||
Mat src = new Mat(4, 1, CvType.CV_32SC1);
|
||||
src.put(0, 0, 2, 4, 3, 9);
|
||||
List<Integer> fs = new ArrayList<Integer>();
|
||||
|
||||
Converters.Mat_to_vector_int(src, fs);
|
||||
List<Integer> truth = new ArrayList<Integer>();
|
||||
truth.add(2);
|
||||
truth.add(4);
|
||||
truth.add(3);
|
||||
truth.add(9);
|
||||
assertListEquals(truth, fs);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_KeyPoint() {
|
||||
Mat src = new Mat(1, 1, CvType.CV_64FC(7));
|
||||
src.put(0, 0, 2, 4, 3, 9, 10, 12, 7);
|
||||
List<KeyPoint> kps = new ArrayList<KeyPoint>();
|
||||
|
||||
Converters.Mat_to_vector_KeyPoint(src, kps);
|
||||
List<KeyPoint> truth = new ArrayList<KeyPoint>();
|
||||
truth.add(new KeyPoint(2, 4, 3, 9, 10, 12, 7));
|
||||
assertListKeyPointEquals(truth, kps, EPS);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Mat() {
|
||||
// Mat src = new Mat(4, 1, CvType.CV_32SC2);
|
||||
// src.put(0, 0, 2, 2, 3, 3, 4, 4, 5, 5);
|
||||
//
|
||||
// List<Mat> mats = new ArrayList<Mat>();
|
||||
// Converters.Mat_to_vector_Mat(src, mats);
|
||||
//
|
||||
// List<Mat> truth = new ArrayList<Mat>();
|
||||
// truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
// truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(3.0)));
|
||||
// truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(4.0)));
|
||||
// truth.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(5.0)));
|
||||
// assertListEqualMat(truth, mats, EPS);
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point() {
|
||||
Mat src = new Mat(4, 1, CvType.CV_32SC2);
|
||||
src.put(0, 0, 2, 4, 3, 9, 10, 4, 35, 54);
|
||||
List<Point> points = new ArrayList<Point>();
|
||||
|
||||
Converters.Mat_to_vector_Point(src, points);
|
||||
List<Point> truth = new ArrayList<Point>();
|
||||
truth.add(new Point(2, 4));
|
||||
truth.add(new Point(3, 9));
|
||||
truth.add(new Point(10, 4));
|
||||
truth.add(new Point(35, 54));
|
||||
assertListPointEquals(truth, points, EPS);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point2d() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point2f() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point3() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point3d() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point3f() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Point3i() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_Rect() {
|
||||
Mat src = new Mat(2, 1, CvType.CV_32SC4);
|
||||
src.put(0, 0, 2, 2, 5, 2, 0, 0, 6, 4);
|
||||
List<Rect> rectangles = new ArrayList<Rect>();
|
||||
|
||||
Converters.Mat_to_vector_Rect(src, rectangles);
|
||||
List<Rect> truth = new ArrayList<Rect>();
|
||||
truth.add(new Rect(2, 2, 5, 2));
|
||||
truth.add(new Rect(0, 0, 6, 4));
|
||||
assertListRectEquals(truth, rectangles);
|
||||
}
|
||||
|
||||
public void testMat_to_vector_uchar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_vector_char() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_vector_DMatch() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMat_to_vector_vector_KeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_char_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_DMatch_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_double_to_Mat() {
|
||||
List<Double> inputVector = new ArrayList<Double>();
|
||||
inputVector.add(2.0);
|
||||
inputVector.add(4.0);
|
||||
inputVector.add(3.0);
|
||||
inputVector.add(9.0);
|
||||
|
||||
dst = Converters.vector_double_to_Mat(inputVector);
|
||||
truth = new Mat(4, 1, CvType.CV_64FC1);
|
||||
truth.put(0, 0, 2, 4, 3, 9);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testVector_float_to_Mat() {
|
||||
List<Float> inputVector = new ArrayList<Float>();
|
||||
inputVector.add(2.0f);
|
||||
inputVector.add(4.0f);
|
||||
inputVector.add(3.0f);
|
||||
inputVector.add(9.0f);
|
||||
|
||||
dst = Converters.vector_float_to_Mat(inputVector);
|
||||
truth = new Mat(4, 1, CvType.CV_32FC1);
|
||||
truth.put(0, 0, 2, 4, 3, 9);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testVector_int_to_Mat() {
|
||||
List<Integer> inputVector = new ArrayList<Integer>();
|
||||
inputVector.add(2);
|
||||
inputVector.add(4);
|
||||
inputVector.add(3);
|
||||
inputVector.add(9);
|
||||
|
||||
dst = Converters.vector_int_to_Mat(inputVector);
|
||||
truth = new Mat(4, 1, CvType.CV_32SC1);
|
||||
truth.put(0, 0, 2, 4, 3, 9);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testVector_KeyPoint_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Mat_to_Mat() {
|
||||
// List<Mat> mats = new ArrayList<Mat>();
|
||||
// mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
// mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
// mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
// mats.add(new Mat(2, 1, CvType.CV_32SC1, Scalar.all(2.0)));
|
||||
// mats.add(gray0);
|
||||
// mats.add(gray255);
|
||||
//
|
||||
// dst = Converters.vector_Mat_to_Mat(mats);
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point_to_Mat() {
|
||||
List<Point> points = new ArrayList<Point>();
|
||||
points.add(new Point(2, 4));
|
||||
points.add(new Point(3, 9));
|
||||
points.add(new Point(10, 4));
|
||||
points.add(new Point(35, 54));
|
||||
|
||||
dst = Converters.vector_Point_to_Mat(points);
|
||||
truth = new Mat(4, 1, CvType.CV_32SC2);
|
||||
truth.put(0, 0, 2, 4, 3, 9, 10, 4, 35, 54);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testVector_Point_to_MatListOfPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point_to_MatListOfPointInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point2d_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point2f_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point3_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point3d_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point3f_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Point3i_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_Rect_to_Mat() {
|
||||
List<Rect> rectangles = new ArrayList<Rect>();
|
||||
rectangles.add(new Rect(2, 2, 5, 2));
|
||||
rectangles.add(new Rect(0, 0, 6, 4));
|
||||
|
||||
dst = Converters.vector_Rect_to_Mat(rectangles);
|
||||
truth = new Mat(2, 1, CvType.CV_32SC4);
|
||||
truth.put(0, 0, 2, 2, 5, 2, 0, 0, 6, 4);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testVector_uchar_to_Mat() {
|
||||
List<Byte> bytes = new ArrayList<Byte>();
|
||||
byte value1 = 1;
|
||||
byte value2 = 2;
|
||||
byte value3 = 3;
|
||||
byte value4 = 4;
|
||||
bytes.add(new Byte(value1));
|
||||
bytes.add(new Byte(value2));
|
||||
bytes.add(new Byte(value3));
|
||||
bytes.add(new Byte(value4));
|
||||
|
||||
dst = Converters.vector_uchar_to_Mat(bytes);
|
||||
truth = new Mat(4, 1, CvType.CV_8UC1);
|
||||
truth.put(0, 0, 1, 2, 3, 4);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testVector_vector_char_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_vector_DMatch_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testVector_vector_KeyPoint_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -4,8 +4,12 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class BackgroundSubtractorMOGTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
public void testApplyMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testApplyMatMatDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testBackgroundSubtractorMOG() {
|
||||
|
@ -1,19 +0,0 @@
|
||||
package org.opencv.test.video;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class BackgroundSubtractorTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testApplyMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testApplyMatMatDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
@ -5,10 +5,6 @@ import org.opencv.video.KalmanFilter;
|
||||
|
||||
public class KalmanFilterTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCorrect() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
@ -11,20 +11,20 @@ import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.utils.Converters;
|
||||
import org.opencv.video.Video;
|
||||
|
||||
public class videoTest extends OpenCVTestCase {
|
||||
public class VideoTest extends OpenCVTestCase {
|
||||
|
||||
private List<Float> err = null;
|
||||
private int h;
|
||||
private List<Point> nextPts = null;
|
||||
List<Point> prevPts = null;
|
||||
|
||||
private int shift1;
|
||||
private int shift2;
|
||||
private int w;
|
||||
private int h;
|
||||
|
||||
private List<Byte> status = null;
|
||||
private Mat subLena1 = null;
|
||||
private Mat subLena2 = null;
|
||||
|
||||
List<Point> prevPts = null;
|
||||
private List<Point> nextPts = null;
|
||||
private List<Byte> status = null;
|
||||
private List<Float> err = null;
|
||||
private int w;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
@ -64,37 +64,37 @@ public class videoTest extends OpenCVTestCase {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDoubleIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloat() {
|
||||
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err);
|
||||
assertEquals(3, Core.countNonZero(Converters.vector_uchar_to_Mat(status)));
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSize() {
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSize() {
|
||||
Size sz = new Size(3, 3);
|
||||
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err, sz);
|
||||
assertEquals(0, Core.countNonZero( Converters.vector_uchar_to_Mat(status) ));
|
||||
}
|
||||
assertEquals(0, Core.countNonZero(Converters.vector_uchar_to_Mat(status)));
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDoubleIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloat() {
|
||||
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err);
|
||||
assertEquals(3, Core.countNonZero( Converters.vector_uchar_to_Mat(status) ));
|
||||
}
|
||||
|
||||
public void testCamShift() {
|
||||
fail("Not yet implemented");
|
||||
}
|
@ -471,6 +471,195 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
|
||||
"imshow" : {'j_code' : '', 'jn_code' : '', 'cpp_code' : '' },
|
||||
"waitKey" : {'j_code' : '', 'jn_code' : '', 'cpp_code' : '' },
|
||||
}, # Highgui
|
||||
|
||||
'CvANN_MLP_TrainParams':
|
||||
{
|
||||
"CvANN_MLP_TrainParams" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvANN_MLP_TrainParams::CvANN_MLP_TrainParams()
|
||||
public CvANN_MLP_TrainParams() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvANN_1MLP_1TrainParams_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvANN_MLP_TrainParams();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvBoostParams':
|
||||
{
|
||||
"CvBoostParams" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvBoostParams::CvBoostParams()
|
||||
public CvBoostParams() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvBoostParams_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvBoostParams();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvDTreeParams':
|
||||
{
|
||||
"CvDTreeParams" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvDTreeParams::CvDTreeParams()
|
||||
public CvDTreeParams() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvDTreeParams_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvDTreeParams();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvEMParams':
|
||||
{
|
||||
"CvEMParams" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvEMParams::CvEMParams()
|
||||
public CvEMParams() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvEMParams_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvEMParams();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvGBTreesParams':
|
||||
{
|
||||
"CvGBTreesParams" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvGBTreesParams::CvGBTreesParams()
|
||||
public CvGBTreesParams() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvGBTreesParams_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvGBTreesParams();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvParamGrid':
|
||||
{
|
||||
"CvParamGrid" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvParamGrid::CvParamGrid()
|
||||
public CvParamGrid() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvParamGrid_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvParamGrid();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvRTParams':
|
||||
{
|
||||
"CvRTParams" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvRTParams::CvRTParams()
|
||||
public CvRTParams() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvRTParams_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvRTParams();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvStatModel':
|
||||
{
|
||||
"CvStatModel" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvStatModel::CvStatModel()
|
||||
public CvStatModel() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvStatModel_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvStatModel();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
|
||||
'CvSVMParams':
|
||||
{
|
||||
"CvSVMParams" :
|
||||
{
|
||||
'j_code' : """
|
||||
//javadoc:CvSVMParams::CvSVMParams()
|
||||
public CvSVMParams() {
|
||||
nativeObj = n_newObj();
|
||||
}
|
||||
""",
|
||||
'jn_code' : 'private static native long n_newObj();',
|
||||
'cpp_code' : """
|
||||
JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvSVMParams_n_1newObj
|
||||
(JNIEnv* env, jclass cls)
|
||||
{
|
||||
return (jlong) new CvSVMParams();
|
||||
}
|
||||
"""
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
# { class : { func : {arg_name : ctype} } }
|
||||
@ -759,6 +948,16 @@ public class %(jc)s {
|
||||
self.add_const(decl)
|
||||
else: # function
|
||||
self.add_func(decl)
|
||||
|
||||
#FIXME: BackgroundSubtractor is merged into BackgroundSubtractorMOG because of inheritance
|
||||
if "BackgroundSubtractor" in self.classes:
|
||||
bs = self.classes["BackgroundSubtractor"]
|
||||
bsmog = self.classes["BackgroundSubtractorMOG"]
|
||||
for name, mtd in bs.methods.items():
|
||||
for fn in mtd.funcs:
|
||||
fn.classname = "BackgroundSubtractorMOG"
|
||||
bsmog.methods[name] = mtd;
|
||||
del self.classes["BackgroundSubtractor"]
|
||||
|
||||
self.cpp_code = StringIO()
|
||||
self.cpp_code.write("""
|
||||
@ -1131,7 +1330,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
|
||||
""" ).substitute( \
|
||||
rtype = rtype, \
|
||||
module = self.module, \
|
||||
clazz = clazz, \
|
||||
clazz = clazz.replace('_', '_1'), \
|
||||
fname = (fi.jname + '_' + str(suffix_counter)).replace('_', '_1'), \
|
||||
args = ", ".join(["%s %s" % (type_dict[a.ctype].get("jni_type"), a.name) for a in jni_args]), \
|
||||
prologue = "\n ".join(c_prologue), \
|
||||
|
Loading…
x
Reference in New Issue
Block a user