java tests: addede tests for Converter and core classes by Hussein Abdinoor
This commit is contained in:
parent
f4e28f87d8
commit
d87f513b4f
@ -3,63 +3,187 @@ package org.opencv.test;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.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 {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testMat_to_vector_float() {
|
||||
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>();
|
||||
|
||||
public void testMat_to_vector_int() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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_KeyPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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>();
|
||||
|
||||
public void testMat_to_vector_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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_Point() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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>();
|
||||
|
||||
public void testMat_to_vector_Rect() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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 testVector_double_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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 testVector_float_to_Mat() {
|
||||
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>();
|
||||
|
||||
public void testVector_int_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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 testVector_Mat_to_Mat() {
|
||||
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>();
|
||||
|
||||
public void testVector_Point_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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_Rect_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_uchar_to_Mat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import junit.framework.TestCase;
|
||||
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.core.Core;
|
||||
import org.opencv.features2d.KeyPoint;
|
||||
@ -20,7 +21,7 @@ public class OpenCVTestCase extends TestCase {
|
||||
|
||||
protected static Mat dst;
|
||||
protected static Mat truth;
|
||||
|
||||
|
||||
protected static Scalar colorBlack;
|
||||
|
||||
// Naming notation: <channels info>_[depth]_[dimensions]_value
|
||||
@ -67,7 +68,7 @@ public class OpenCVTestCase extends TestCase {
|
||||
|
||||
protected static Mat v1;
|
||||
protected static Mat v2;
|
||||
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
@ -76,7 +77,7 @@ public class OpenCVTestCase extends TestCase {
|
||||
assertTrue(dst.empty());
|
||||
truth = new Mat();
|
||||
assertTrue(truth.empty());
|
||||
|
||||
|
||||
colorBlack = new Scalar(0);
|
||||
|
||||
gray0 = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(0));
|
||||
@ -98,8 +99,7 @@ public class OpenCVTestCase extends TestCase {
|
||||
gray1_32f = new Mat(matSize, matSize, CvType.CV_32F, new Scalar(1.0));
|
||||
gray3_32f = new Mat(matSize, matSize, CvType.CV_32F, new Scalar(3.0));
|
||||
gray9_32f = new Mat(matSize, matSize, CvType.CV_32F, new Scalar(9.0));
|
||||
gray255_32f = new Mat(matSize, matSize, CvType.CV_32F,
|
||||
new Scalar(255.0));
|
||||
gray255_32f = new Mat(matSize, matSize, CvType.CV_32F, new Scalar(255.0));
|
||||
grayE_32f = new Mat(matSize, matSize, CvType.CV_32F);
|
||||
grayE_32f = Mat.eye(matSize, matSize, CvType.CV_32FC1);
|
||||
grayRnd_32f = new Mat(matSize, matSize, CvType.CV_32F);
|
||||
@ -121,10 +121,10 @@ public class OpenCVTestCase extends TestCase {
|
||||
v2 = new Mat(1, 3, CvType.CV_32F);
|
||||
v2.put(0, 0, 2.0, 1.0, 3.0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
|
||||
|
||||
gray0.release();
|
||||
gray1.release();
|
||||
gray2.release();
|
||||
@ -153,20 +153,71 @@ public class OpenCVTestCase extends TestCase {
|
||||
grayChess.release();
|
||||
v1.release();
|
||||
v2.release();
|
||||
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public static void assertListEqual(List<Float> list1, List<Float> list2, double epsilon)
|
||||
{
|
||||
public static void assertListIntegerEquals(List<Integer> list1, List<Integer> list2) {
|
||||
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);
|
||||
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
|
||||
public static void assertListMatEquals(List<Mat> list1, List<Mat> list2, double epsilon) {
|
||||
if (list1.size() != list2.size()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
for (int i = 0; i < list1.size(); i++)
|
||||
assertMatEqual(list1.get(i), list2.get(i), epsilon);
|
||||
}
|
||||
|
||||
public static void assertListPointEquals(List<Point> list1, List<Point> list2, double epsilon) {
|
||||
if (list1.size() != list2.size()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
for (int i = 0; i < list1.size(); i++)
|
||||
assertPointEquals(list1.get(i), list2.get(i), epsilon);
|
||||
}
|
||||
|
||||
public static void assertListKeyPointEquals(List<KeyPoint> list1, List<KeyPoint> list2, double epsilon) {
|
||||
if (list1.size() != list2.size()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
for (int i = 0; i < list1.size(); i++)
|
||||
assertKeyPointEqual(list1.get(i), list2.get(i), epsilon);
|
||||
}
|
||||
|
||||
public static void assertListRectEquals(List<Rect> list1, List<Rect> list2) {
|
||||
if (list1.size() != list2.size()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
for (int i = 0; i < list1.size(); i++)
|
||||
assertRectEquals(list1.get(i), list2.get(i));
|
||||
}
|
||||
|
||||
public static void assertRectEquals(Rect expected, Rect actual) {
|
||||
assertEquals(expected.x, actual.x);
|
||||
assertEquals(expected.y, actual.y);
|
||||
assertEquals(expected.width, actual.width);
|
||||
assertEquals(expected.height, actual.height);
|
||||
}
|
||||
|
||||
public static void assertMatEqual(Mat m1, Mat m2) {
|
||||
compareMats(m1, m2, true);
|
||||
}
|
||||
@ -174,16 +225,16 @@ public class OpenCVTestCase extends TestCase {
|
||||
public static void assertMatNotEqual(Mat m1, Mat m2) {
|
||||
compareMats(m1, m2, false);
|
||||
}
|
||||
|
||||
public static void assertMatEqual(Mat expected, Mat actual, double eps){
|
||||
|
||||
public static void assertMatEqual(Mat expected, Mat actual, double eps) {
|
||||
compareMats(expected, actual, eps, true);
|
||||
}
|
||||
|
||||
public static void assertMatNotEqual(Mat expected, Mat actual, double eps){
|
||||
|
||||
public static void assertMatNotEqual(Mat expected, Mat actual, double eps) {
|
||||
compareMats(expected, actual, eps, false);
|
||||
}
|
||||
|
||||
public static void assertKeyPointEqual(KeyPoint expected, KeyPoint actual, double eps){
|
||||
|
||||
public static void assertKeyPointEqual(KeyPoint expected, KeyPoint actual, double eps) {
|
||||
assertTrue(Math.hypot(expected.pt.x - actual.pt.x, expected.pt.y - actual.pt.y) < eps);
|
||||
assertTrue(Math.abs(expected.size - actual.size) < eps);
|
||||
assertTrue(Math.abs(expected.angle - actual.angle) < eps);
|
||||
@ -191,47 +242,49 @@ public class OpenCVTestCase extends TestCase {
|
||||
assertEquals(expected.octave, actual.octave);
|
||||
assertEquals(expected.class_id, actual.class_id);
|
||||
}
|
||||
|
||||
public static void assertPointEquals(Point expected, Point actual, double eps){
|
||||
|
||||
public static void assertPointEquals(Point expected, Point actual, double eps) {
|
||||
assertEquals(expected.x, actual.x, eps);
|
||||
assertEquals(expected.y, actual.y, eps);
|
||||
}
|
||||
|
||||
static private void compareMats(Mat expected, Mat actual, boolean isEqualityMeasured) {
|
||||
if (expected.type() != actual.type() || expected.cols() != actual.cols()
|
||||
|| expected.rows() != actual.rows()) {
|
||||
if (expected.type() != actual.type() || expected.cols() != actual.cols() || expected.rows() != actual.rows()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
if (expected.depth() == CvType.CV_32F || expected.depth() == CvType.CV_64F){
|
||||
|
||||
if (expected.depth() == CvType.CV_32F || expected.depth() == CvType.CV_64F) {
|
||||
if (isEqualityMeasured)
|
||||
throw new UnsupportedOperationException("Floating-point Mats must not be checked for exact match. Use assertMatEqual(Mat expected, Mat actual, double eps) instead.");
|
||||
throw new UnsupportedOperationException(
|
||||
"Floating-point Mats must not be checked for exact match. Use assertMatEqual(Mat expected, Mat actual, double eps) instead.");
|
||||
else
|
||||
throw new UnsupportedOperationException("Floating-point Mats must not be checked for exact match. Use assertMatNotEqual(Mat expected, Mat actual, double eps) instead.");
|
||||
throw new UnsupportedOperationException(
|
||||
"Floating-point Mats must not be checked for exact match. Use assertMatNotEqual(Mat expected, Mat actual, double eps) instead.");
|
||||
}
|
||||
|
||||
|
||||
Mat diff = new Mat();
|
||||
Core.absdiff(expected, actual, diff);
|
||||
Mat reshaped = diff.reshape(1);
|
||||
int mistakes = Core.countNonZero(reshaped);
|
||||
|
||||
|
||||
reshaped.release();
|
||||
diff.release();
|
||||
|
||||
if(isEqualityMeasured)
|
||||
|
||||
if (isEqualityMeasured)
|
||||
assertTrue("Mats are different in " + mistakes + " points", 0 == mistakes);
|
||||
else
|
||||
assertFalse("Mats are equal", 0 == mistakes);
|
||||
}
|
||||
|
||||
|
||||
static private void compareMats(Mat expected, Mat actual, double eps, boolean isEqualityMeasured) {
|
||||
if (expected.type() != actual.type() || expected.cols() != actual.cols()
|
||||
|| expected.rows() != actual.rows()) {
|
||||
if (expected.type() != actual.type() || expected.cols() != actual.cols() || expected.rows() != actual.rows()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
Mat diff = new Mat();
|
||||
Core.absdiff(expected, actual, diff);
|
||||
if(isEqualityMeasured)
|
||||
|
||||
if (isEqualityMeasured)
|
||||
assertTrue("Max difference between expected and actiual Mats is bigger than " + eps,
|
||||
Core.checkRange(diff, true, new Point(), 0.0, eps));
|
||||
else
|
||||
@ -240,8 +293,7 @@ public class OpenCVTestCase extends TestCase {
|
||||
}
|
||||
|
||||
public void test_1(String label) {
|
||||
OpenCVTestRunner
|
||||
.Log("================================================");
|
||||
OpenCVTestRunner.Log("================================================");
|
||||
OpenCVTestRunner.Log("=============== " + label);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
|
||||
static public void Log(String message) {
|
||||
Log.e(TAG, message);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
context = getContext();
|
||||
|
@ -4,32 +4,32 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class StereoBMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testComputeMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testComputeMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testComputeMatMatMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testComputeMatMatMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoBM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoBM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoBMInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoBMInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoBMIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoBMIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoBMIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoBMIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,140 +4,140 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class StereoSGBMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCompute() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCompute() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_disp12MaxDiff() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_disp12MaxDiff() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_fullDP() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_fullDP() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_minDisparity() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_minDisparity() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_numberOfDisparities() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_numberOfDisparities() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_P1() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_P1() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_P2() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_P2() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_preFilterCap() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_preFilterCap() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_SADWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_SADWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_speckleRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_speckleRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_speckleWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_speckleWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_uniquenessRatio() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_uniquenessRatio() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_disp12MaxDiff() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_disp12MaxDiff() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_fullDP() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_fullDP() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_minDisparity() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_minDisparity() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_numberOfDisparities() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_numberOfDisparities() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_P1() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_P1() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_P2() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_P2() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_preFilterCap() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_preFilterCap() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_SADWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_SADWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_speckleRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_speckleRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_speckleWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_speckleWindowSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_uniquenessRatio() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_uniquenessRatio() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntIntIntIntBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testStereoSGBMIntIntIntIntIntIntIntIntIntIntBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package org.opencv.test.calib3d;
|
||||
|
||||
import org.opencv.Converters;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.calib3d.Calib3d;
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.CvType;
|
||||
@ -11,9 +13,6 @@ import org.opencv.core.Scalar;
|
||||
import org.opencv.core.Size;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class calib3dTest extends OpenCVTestCase {
|
||||
|
||||
public void test_1() {
|
||||
@ -167,8 +166,7 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
|
||||
public void testFilterSpecklesMatDoubleIntDouble() {
|
||||
gray_16s_1024.copyTo(dst);
|
||||
Point center = new Point(gray_16s_1024.rows() / 2.,
|
||||
gray_16s_1024.cols() / 2.);
|
||||
Point center = new Point(gray_16s_1024.rows() / 2., gray_16s_1024.cols() / 2.);
|
||||
Core.circle(dst, center, 1, Scalar.all(4096));
|
||||
|
||||
assertMatNotEqual(gray_16s_1024, dst);
|
||||
@ -188,10 +186,8 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
|
||||
public void testFindChessboardCornersMatSizeMatInt() {
|
||||
Size patternSize = new Size(9, 6);
|
||||
Calib3d.findChessboardCorners(grayChess, patternSize, dst,
|
||||
Calib3d.CALIB_CB_ADAPTIVE_THRESH
|
||||
+ Calib3d.CALIB_CB_NORMALIZE_IMAGE
|
||||
+ Calib3d.CALIB_CB_FAST_CHECK);
|
||||
Calib3d.findChessboardCorners(grayChess, patternSize, dst, Calib3d.CALIB_CB_ADAPTIVE_THRESH + Calib3d.CALIB_CB_NORMALIZE_IMAGE
|
||||
+ Calib3d.CALIB_CB_FAST_CHECK);
|
||||
assertTrue(!dst.empty());
|
||||
}
|
||||
|
||||
@ -201,13 +197,11 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
img.setTo(new Scalar(255));
|
||||
Mat centers = new Mat();
|
||||
|
||||
assertFalse(Calib3d
|
||||
.findCirclesGridDefault(img, new Size(5, 5), centers));
|
||||
assertFalse(Calib3d.findCirclesGridDefault(img, new Size(5, 5), centers));
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
for (int j = 0; j < 5; j++) {
|
||||
Point pt = new Point(size * (2 * i + 1) / 10, size
|
||||
* (2 * j + 1) / 10);
|
||||
Point pt = new Point(size * (2 * i + 1) / 10, size * (2 * j + 1) / 10);
|
||||
Core.circle(img, pt, 10, new Scalar(0), -1);
|
||||
}
|
||||
|
||||
@ -227,22 +221,20 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
img.setTo(new Scalar(255));
|
||||
Mat centers = new Mat();
|
||||
|
||||
assertFalse(Calib3d.findCirclesGridDefault(img, new Size(3, 5),
|
||||
centers, Calib3d.CALIB_CB_CLUSTERING
|
||||
| Calib3d.CALIB_CB_ASYMMETRIC_GRID));
|
||||
assertFalse(Calib3d.findCirclesGridDefault(img, new Size(3, 5), centers, Calib3d.CALIB_CB_CLUSTERING
|
||||
| Calib3d.CALIB_CB_ASYMMETRIC_GRID));
|
||||
|
||||
int step = size * 2 / 15;
|
||||
int offsetx = size / 6;
|
||||
int offsety = (size - 4 * step) / 2;
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int j = 0; j < 5; j++) {
|
||||
Point pt = new Point(offsetx + (2 * i + j % 2) * step, offsety
|
||||
+ step * j);
|
||||
Point pt = new Point(offsetx + (2 * i + j % 2) * step, offsety + step * j);
|
||||
Core.circle(img, pt, 10, new Scalar(0), -1);
|
||||
}
|
||||
|
||||
assertTrue(Calib3d.findCirclesGridDefault(img, new Size(3, 5), centers,
|
||||
Calib3d.CALIB_CB_CLUSTERING | Calib3d.CALIB_CB_ASYMMETRIC_GRID));
|
||||
assertTrue(Calib3d.findCirclesGridDefault(img, new Size(3, 5), centers, Calib3d.CALIB_CB_CLUSTERING
|
||||
| Calib3d.CALIB_CB_ASYMMETRIC_GRID));
|
||||
|
||||
assertEquals(15, centers.rows());
|
||||
assertEquals(1, centers.cols());
|
||||
@ -253,17 +245,18 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
List<Point> pts1 = new ArrayList<Point>();
|
||||
List<Point> pts2 = new ArrayList<Point>();
|
||||
|
||||
int minFundamentalMatPoints = 9; //FIXME: probably should be 8 (see ticket #1262)
|
||||
int minFundamentalMatPoints = 9; // FIXME: probably should be 8 (see
|
||||
// ticket #1262)
|
||||
for (int i = 0; i < minFundamentalMatPoints; i++) {
|
||||
double x = Math.random() * 100 - 50;
|
||||
double y = Math.random() * 100 - 50;
|
||||
pts1.add(new Point(x, y));
|
||||
pts2.add(new Point(x, y));
|
||||
}
|
||||
|
||||
|
||||
Mat fm = Calib3d.findFundamentalMat(pts1, pts2);
|
||||
|
||||
truth = new Mat(3,3,CvType.CV_64F);
|
||||
|
||||
truth = new Mat(3, 3, CvType.CV_64F);
|
||||
truth.put(0, 0, 0, -0.5, -0.5, 0.5, 0, 0, 0.5, 0, 0);
|
||||
assertMatEqual(truth, fm, EPS);
|
||||
}
|
||||
@ -365,121 +358,106 @@ public class calib3dTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testReprojectImageTo3DMatMatMat() {
|
||||
Mat transformMatrix = new Mat(4,4,CvType.CV_64F);
|
||||
transformMatrix.put(0, 0,
|
||||
0, 1, 0, 0,
|
||||
1, 0, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1);
|
||||
|
||||
Mat disparity = new Mat(matSize,matSize,CvType.CV_32F);
|
||||
|
||||
Mat transformMatrix = new Mat(4, 4, CvType.CV_64F);
|
||||
transformMatrix.put(0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
|
||||
|
||||
Mat disparity = new Mat(matSize, matSize, CvType.CV_32F);
|
||||
|
||||
float[] disp = new float[matSize * matSize];
|
||||
for (int i = 0; i < matSize; i++)
|
||||
for(int j = 0; j < matSize; j++)
|
||||
for (int j = 0; j < matSize; j++)
|
||||
disp[i * matSize + j] = i - j;
|
||||
disparity.put(0, 0, disp);
|
||||
|
||||
|
||||
Mat _3dPoints = new Mat();
|
||||
|
||||
|
||||
Calib3d.reprojectImageTo3D(disparity, _3dPoints, transformMatrix);
|
||||
|
||||
|
||||
assertEquals(CvType.CV_32FC3, _3dPoints.type());
|
||||
assertEquals(matSize, _3dPoints.rows());
|
||||
assertEquals(matSize, _3dPoints.cols());
|
||||
|
||||
truth = new Mat(matSize,matSize,CvType.CV_32FC3);
|
||||
|
||||
|
||||
truth = new Mat(matSize, matSize, CvType.CV_32FC3);
|
||||
|
||||
float[] _truth = new float[matSize * matSize * 3];
|
||||
for (int i = 0; i < matSize; i++)
|
||||
for(int j = 0; j < matSize; j++)
|
||||
{
|
||||
for (int j = 0; j < matSize; j++) {
|
||||
_truth[(i * matSize + j) * 3 + 0] = i;
|
||||
_truth[(i * matSize + j) * 3 + 1] = j;
|
||||
_truth[(i * matSize + j) * 3 + 2] = i-j;
|
||||
_truth[(i * matSize + j) * 3 + 2] = i - j;
|
||||
}
|
||||
truth.put(0, 0, _truth);
|
||||
|
||||
|
||||
assertMatEqual(truth, _3dPoints, EPS);
|
||||
}
|
||||
|
||||
public void testReprojectImageTo3DMatMatMatBoolean() {
|
||||
Mat transformMatrix = new Mat(4,4,CvType.CV_64F);
|
||||
transformMatrix.put(0, 0,
|
||||
0, 1, 0, 0,
|
||||
1, 0, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1);
|
||||
|
||||
Mat disparity = new Mat(matSize,matSize,CvType.CV_32F);
|
||||
|
||||
Mat transformMatrix = new Mat(4, 4, CvType.CV_64F);
|
||||
transformMatrix.put(0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
|
||||
|
||||
Mat disparity = new Mat(matSize, matSize, CvType.CV_32F);
|
||||
|
||||
float[] disp = new float[matSize * matSize];
|
||||
for (int i = 0; i < matSize; i++)
|
||||
for(int j = 0; j < matSize; j++)
|
||||
for (int j = 0; j < matSize; j++)
|
||||
disp[i * matSize + j] = i - j;
|
||||
disp[0] = -Float.MAX_VALUE;
|
||||
disparity.put(0, 0, disp);
|
||||
|
||||
|
||||
Mat _3dPoints = new Mat();
|
||||
|
||||
|
||||
Calib3d.reprojectImageTo3D(disparity, _3dPoints, transformMatrix, true);
|
||||
|
||||
|
||||
assertEquals(CvType.CV_32FC3, _3dPoints.type());
|
||||
assertEquals(matSize, _3dPoints.rows());
|
||||
assertEquals(matSize, _3dPoints.cols());
|
||||
|
||||
truth = new Mat(matSize,matSize,CvType.CV_32FC3);
|
||||
|
||||
|
||||
truth = new Mat(matSize, matSize, CvType.CV_32FC3);
|
||||
|
||||
float[] _truth = new float[matSize * matSize * 3];
|
||||
for (int i = 0; i < matSize; i++)
|
||||
for(int j = 0; j < matSize; j++)
|
||||
{
|
||||
for (int j = 0; j < matSize; j++) {
|
||||
_truth[(i * matSize + j) * 3 + 0] = i;
|
||||
_truth[(i * matSize + j) * 3 + 1] = j;
|
||||
_truth[(i * matSize + j) * 3 + 2] = i-j;
|
||||
_truth[(i * matSize + j) * 3 + 2] = i - j;
|
||||
}
|
||||
_truth[2] = 10000;
|
||||
truth.put(0, 0, _truth);
|
||||
|
||||
|
||||
assertMatEqual(truth, _3dPoints, EPS);
|
||||
}
|
||||
|
||||
public void testReprojectImageTo3DMatMatMatBooleanInt() {
|
||||
Mat transformMatrix = new Mat(4,4,CvType.CV_64F);
|
||||
transformMatrix.put(0, 0,
|
||||
0, 1, 0, 0,
|
||||
1, 0, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1);
|
||||
|
||||
Mat disparity = new Mat(matSize,matSize,CvType.CV_32F);
|
||||
|
||||
Mat transformMatrix = new Mat(4, 4, CvType.CV_64F);
|
||||
transformMatrix.put(0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
|
||||
|
||||
Mat disparity = new Mat(matSize, matSize, CvType.CV_32F);
|
||||
|
||||
float[] disp = new float[matSize * matSize];
|
||||
for (int i = 0; i < matSize; i++)
|
||||
for(int j = 0; j < matSize; j++)
|
||||
for (int j = 0; j < matSize; j++)
|
||||
disp[i * matSize + j] = i - j;
|
||||
disparity.put(0, 0, disp);
|
||||
|
||||
|
||||
Mat _3dPoints = new Mat();
|
||||
|
||||
|
||||
Calib3d.reprojectImageTo3D(disparity, _3dPoints, transformMatrix, false, CvType.CV_16S);
|
||||
|
||||
|
||||
assertEquals(CvType.CV_16SC3, _3dPoints.type());
|
||||
assertEquals(matSize, _3dPoints.rows());
|
||||
assertEquals(matSize, _3dPoints.cols());
|
||||
|
||||
truth = new Mat(matSize,matSize,CvType.CV_16SC3);
|
||||
|
||||
|
||||
truth = new Mat(matSize, matSize, CvType.CV_16SC3);
|
||||
|
||||
short[] _truth = new short[matSize * matSize * 3];
|
||||
for (short i = 0; i < matSize; i++)
|
||||
for(short j = 0; j < matSize; j++)
|
||||
{
|
||||
for (short j = 0; j < matSize; j++) {
|
||||
_truth[(i * matSize + j) * 3 + 0] = i;
|
||||
_truth[(i * matSize + j) * 3 + 1] = j;
|
||||
_truth[(i * matSize + j) * 3 + 2] = (short) (i-j);
|
||||
_truth[(i * matSize + j) * 3 + 2] = (short) (i - j);
|
||||
}
|
||||
truth.put(0, 0, _truth);
|
||||
|
||||
|
||||
assertMatEqual(truth, _3dPoints, EPS);
|
||||
}
|
||||
|
||||
|
@ -160,13 +160,11 @@ public class MatTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testMatIntIntCvTypeScalar() {
|
||||
dst = new Mat(gray127.rows(), gray127.cols(), CvType.CV_8U, new Scalar(
|
||||
127));
|
||||
dst = new Mat(gray127.rows(), gray127.cols(), CvType.CV_8U, new Scalar(127));
|
||||
assertFalse(dst.empty());
|
||||
assertMatEqual(dst, gray127);
|
||||
|
||||
dst = new Mat(rgba128.rows(), rgba128.cols(), CvType.CV_8UC4,
|
||||
Scalar.all(128));
|
||||
dst = new Mat(rgba128.rows(), rgba128.cols(), CvType.CV_8UC4, Scalar.all(128));
|
||||
assertFalse(dst.empty());
|
||||
assertMatEqual(dst, rgba128);
|
||||
}
|
||||
@ -180,13 +178,11 @@ public class MatTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testMatIntIntIntScalar() {
|
||||
Mat m1 = new Mat(gray127.rows(), gray127.cols(), CvType.CV_8U,
|
||||
new Scalar(127));
|
||||
Mat m1 = new Mat(gray127.rows(), gray127.cols(), CvType.CV_8U, new Scalar(127));
|
||||
assertFalse(m1.empty());
|
||||
assertMatEqual(m1, gray127);
|
||||
|
||||
Mat m2 = new Mat(gray0_32f.rows(), gray0_32f.cols(), CvType.CV_32F,
|
||||
new Scalar(0));
|
||||
Mat m2 = new Mat(gray0_32f.rows(), gray0_32f.cols(), CvType.CV_32F, new Scalar(0));
|
||||
assertFalse(m2.empty());
|
||||
assertMatEqual(m2, gray0_32f, EPS);
|
||||
}
|
||||
|
@ -1,47 +1,96 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Point3;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class Point3Test extends OpenCVTestCase {
|
||||
|
||||
private Point3 p1;
|
||||
private Point3 p2;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
p1 = new Point3(2, 2, 2);
|
||||
p2 = new Point3(1, 1, 1);
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClone() {
|
||||
Point3 truth = new Point3(1, 1, 1);
|
||||
p1 = truth.clone();
|
||||
assertEquals(truth, p1);
|
||||
}
|
||||
|
||||
public void testCross() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCross() {
|
||||
Point3 dstPoint = p1.cross(p2);
|
||||
Point3 truth = new Point3(0, 0, 0);
|
||||
assertEquals(truth, dstPoint);
|
||||
}
|
||||
|
||||
public void testDot() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDot() {
|
||||
double result = p1.dot(p2);
|
||||
assertEquals(6.0, result);
|
||||
}
|
||||
|
||||
public void testEqualsObject() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
boolean flag = p1.equals(p1);
|
||||
assertTrue(flag);
|
||||
|
||||
public void testPoint3() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
flag = p1.equals(p2);
|
||||
assertFalse(flag);
|
||||
}
|
||||
|
||||
public void testPoint3DoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPoint3() {
|
||||
p1 = new Point3();
|
||||
|
||||
assertNotNull(p1);
|
||||
assertTrue(0 == p1.x);
|
||||
assertTrue(0 == p1.y);
|
||||
assertTrue(0 == p1.z);
|
||||
}
|
||||
|
||||
public void testPoint3DoubleDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPoint3DoubleArray() {
|
||||
double[] vals = { 1, 2, 3 };
|
||||
p1 = new Point3(vals);
|
||||
|
||||
public void testPoint3Point() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertTrue(1 == p1.x);
|
||||
assertTrue(2 == p1.y);
|
||||
assertTrue(3 == p1.z);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPoint3DoubleDoubleDouble() {
|
||||
p1 = new Point3(1, 2, 3);
|
||||
|
||||
assertEquals(1., p1.x);
|
||||
assertEquals(2., p1.y);
|
||||
assertEquals(3., p1.z);
|
||||
}
|
||||
|
||||
public void testPoint3Point() {
|
||||
Point p = new Point(2, 3);
|
||||
p1 = new Point3(p);
|
||||
|
||||
assertEquals(2., p1.x);
|
||||
assertEquals(3., p1.y);
|
||||
assertEquals(0., p1.z);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
p1.set(vals1);
|
||||
|
||||
assertEquals(0., p1.x);
|
||||
assertEquals(0., p1.y);
|
||||
assertEquals(0., p1.z);
|
||||
|
||||
double[] vals2 = { 3, 6, 10 };
|
||||
p1.set(vals2);
|
||||
|
||||
assertEquals(3., p1.x);
|
||||
assertEquals(6., p1.y);
|
||||
assertEquals(10., p1.z);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,47 +1,89 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Rect;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class PointTest extends OpenCVTestCase {
|
||||
|
||||
private Point p1;
|
||||
private Point p2;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
p1 = new Point(2, 2);
|
||||
p2 = new Point(1, 1);
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClone() {
|
||||
Point truth = new Point(1, 1);
|
||||
Point dstPoint = truth.clone();
|
||||
assertEquals(truth, dstPoint);
|
||||
}
|
||||
|
||||
public void testDot() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDot() {
|
||||
double result = p1.dot(p2);
|
||||
assertEquals(4.0, result);
|
||||
}
|
||||
|
||||
public void testEqualsObject() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
boolean flag = p1.equals(p1);
|
||||
assertTrue(flag);
|
||||
|
||||
public void testInside() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
flag = p1.equals(p2);
|
||||
assertFalse(flag);
|
||||
}
|
||||
|
||||
public void testPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testInside() {
|
||||
Rect rect = new Rect(0, 0, 5, 3);
|
||||
assertTrue(p1.inside(rect));
|
||||
|
||||
public void testPointDoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
Point p2 = new Point(3, 3);
|
||||
assertFalse(p2.inside(rect));
|
||||
}
|
||||
|
||||
public void testPointDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPoint() {
|
||||
Point p = new Point();
|
||||
|
||||
assertNotNull(p);
|
||||
assertEquals(0.0, p.x);
|
||||
assertEquals(0.0, p.y);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPointDoubleArray() {
|
||||
double[] vals = { 2, 4 };
|
||||
Point p = new Point(vals);
|
||||
|
||||
public void testToString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertEquals(2.0, p.x);
|
||||
assertEquals(4.0, p.y);
|
||||
}
|
||||
|
||||
public void testPointDoubleDouble() {
|
||||
p1 = new Point(7, 5);
|
||||
|
||||
assertNotNull(p1);
|
||||
assertEquals(7.0, p1.x);
|
||||
assertEquals(5.0, p1.y);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
p1.set(vals1);
|
||||
assertEquals(0.0, p1.x);
|
||||
assertEquals(0.0, p1.y);
|
||||
|
||||
double[] vals2 = { 6, 10 };
|
||||
p2.set(vals2);
|
||||
assertEquals(6.0, p2.x);
|
||||
assertEquals(10.0, p2.y);
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
String actual = p1.toString();
|
||||
String expected = "{2.0, 2.0}";
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,59 +1,109 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.Range;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class RangeTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
Range range;
|
||||
Range r1;
|
||||
Range r2;
|
||||
|
||||
public void testAll() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
range = new Range();
|
||||
r1 = new Range(1, 11);
|
||||
r2 = new Range(1, 1);
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testAll() {
|
||||
range = Range.all();
|
||||
assertEquals(Integer.MIN_VALUE, range.start);
|
||||
assertEquals(Integer.MAX_VALUE, range.end);
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClone() {
|
||||
Range dstRange = new Range();
|
||||
dstRange = r1.clone();
|
||||
assertEquals(r1, dstRange);
|
||||
}
|
||||
|
||||
public void testEqualsObject() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEmpty() {
|
||||
boolean flag;
|
||||
|
||||
public void testIntersection() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
flag = r1.empty();
|
||||
assertFalse(flag);
|
||||
|
||||
public void testRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
flag = r2.empty();
|
||||
assertTrue(flag);
|
||||
}
|
||||
|
||||
public void testRangeDoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
assertFalse(r2.equals(r1));
|
||||
|
||||
range = r1.clone();
|
||||
assertTrue(r1.equals(range));
|
||||
}
|
||||
|
||||
public void testRangeIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testIntersection() {
|
||||
range = r1.intersection(r2);
|
||||
assertEquals(r2, range);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testRange() {
|
||||
range = new Range();
|
||||
|
||||
assertNotNull(range);
|
||||
assertEquals(0, range.start);
|
||||
assertEquals(0, range.end);
|
||||
}
|
||||
|
||||
public void testShift() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testRangeDoubleArray() {
|
||||
double[] vals = { 2, 4 };
|
||||
Range r = new Range(vals);
|
||||
|
||||
public void testSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertTrue(2 == r.start);
|
||||
assertTrue(4 == r.end);
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testRangeIntInt() {
|
||||
r1 = new Range(12, 13);
|
||||
|
||||
assertNotNull(r1);
|
||||
assertEquals(12, r1.start);
|
||||
assertEquals(13, r1.end);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
r1.set(vals1);
|
||||
assertEquals(0, r1.start);
|
||||
assertEquals(0, r1.end);
|
||||
|
||||
double[] vals2 = { 6, 10 };
|
||||
r2.set(vals2);
|
||||
assertEquals(6, r2.start);
|
||||
assertEquals(10, r2.end);
|
||||
}
|
||||
|
||||
public void testShift() {
|
||||
int delta = 1;
|
||||
range = range.shift(delta);
|
||||
assertEquals(r2, range);
|
||||
}
|
||||
|
||||
public void testSize() {
|
||||
assertEquals(10, r1.size());
|
||||
|
||||
assertEquals(0, r2.size());
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
String actual = r1.toString();
|
||||
String expected = "[1, 11)";
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,82 +2,158 @@ package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Rect;
|
||||
import org.opencv.core.Size;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class RectTest extends OpenCVTestCase {
|
||||
|
||||
private Rect r;
|
||||
private Rect rect;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
r = new Rect();
|
||||
rect = new Rect(0, 0, 10, 10);
|
||||
}
|
||||
|
||||
public void testArea() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testArea() {
|
||||
double area;
|
||||
area = rect.area();
|
||||
assertEquals(100.0, area);
|
||||
}
|
||||
|
||||
public void testBr() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testBr() {
|
||||
Point p_br = new Point();
|
||||
p_br = rect.br();
|
||||
Point truth = new Point(10, 10);
|
||||
assertEquals(truth, p_br);
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClone() {
|
||||
r = rect.clone();
|
||||
assertEquals(rect, r);
|
||||
}
|
||||
|
||||
public void testContains() {
|
||||
Rect r = 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);
|
||||
Point p_br = new Point(10,0);
|
||||
Point p_tl = new Point(0,10);
|
||||
Point p_tr = new Point(10,10);
|
||||
|
||||
assertTrue(r.contains(p_inner));
|
||||
assertTrue(r.contains(p_bl));
|
||||
|
||||
assertFalse(r.contains(p_outer));
|
||||
assertFalse(r.contains(p_br));
|
||||
assertFalse(r.contains(p_tl));
|
||||
assertFalse(r.contains(p_tr));
|
||||
}
|
||||
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);
|
||||
Point p_br = new Point(10, 0);
|
||||
Point p_tl = new Point(0, 10);
|
||||
Point p_tr = new Point(10, 10);
|
||||
|
||||
public void testEqualsObject() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertTrue(rect.contains(p_inner));
|
||||
assertTrue(rect.contains(p_bl));
|
||||
|
||||
public void testRect() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertFalse(rect.contains(p_outer));
|
||||
assertFalse(rect.contains(p_br));
|
||||
assertFalse(rect.contains(p_tl));
|
||||
assertFalse(rect.contains(p_tr));
|
||||
}
|
||||
|
||||
public void testRectDoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
boolean flag;
|
||||
flag = rect.equals(r);
|
||||
assertFalse(flag);
|
||||
|
||||
public void testRectIntIntIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
r = rect.clone();
|
||||
flag = rect.equals(r);
|
||||
assertTrue(flag);
|
||||
}
|
||||
|
||||
public void testRectPointPoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testRect() {
|
||||
r = new Rect();
|
||||
|
||||
assertEquals(0, r.x);
|
||||
assertEquals(0, r.y);
|
||||
assertEquals(0, r.width);
|
||||
assertEquals(0, r.height);
|
||||
}
|
||||
|
||||
public void testRectPointSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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);
|
||||
assertEquals(2, r.height);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testRectIntIntIntInt() {
|
||||
r = new Rect(1, 3, 5, 2);
|
||||
|
||||
assertNotNull(rect);
|
||||
assertEquals(0, rect.x);
|
||||
assertEquals(0, rect.y);
|
||||
assertEquals(10, rect.width);
|
||||
assertEquals(10, rect.height);
|
||||
}
|
||||
|
||||
public void testSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testRectPointPoint() {
|
||||
Point p1 = new Point(4, 4);
|
||||
Point p2 = new Point(2, 3);
|
||||
|
||||
r = new Rect(p1, p2);
|
||||
assertNotNull(r);
|
||||
assertEquals(2, r.x);
|
||||
assertEquals(3, r.y);
|
||||
assertEquals(2, r.width);
|
||||
assertEquals(1, r.height);
|
||||
}
|
||||
|
||||
public void testTl() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testRectPointSize() {
|
||||
Point p1 = new Point(4, 4);
|
||||
Size sz = new Size(3, 1);
|
||||
r = new Rect(p1, sz);
|
||||
|
||||
public void testToString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertEquals(4, r.x);
|
||||
assertEquals(4, r.y);
|
||||
assertEquals(3, r.width);
|
||||
assertEquals(1, r.height);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
Rect r1 = new Rect(vals1);
|
||||
|
||||
assertEquals(0, r1.x);
|
||||
assertEquals(0, r1.y);
|
||||
assertEquals(0, r1.width);
|
||||
assertEquals(0, r1.height);
|
||||
|
||||
double[] vals2 = { 2, 2, 10, 5 };
|
||||
r = new Rect(vals2);
|
||||
|
||||
assertEquals(2, r.x);
|
||||
assertEquals(2, r.y);
|
||||
assertEquals(10, r.width);
|
||||
assertEquals(5, r.height);
|
||||
}
|
||||
|
||||
public void testSize() {
|
||||
Size s1 = new Size(0, 0);
|
||||
assertEquals(s1, r.size());
|
||||
|
||||
Size s2 = new Size(10, 10);
|
||||
assertEquals(s2, rect.size());
|
||||
}
|
||||
|
||||
public void testTl() {
|
||||
Point p_tl = new Point();
|
||||
p_tl = rect.tl();
|
||||
Point truth = new Point(0, 0);
|
||||
assertEquals(truth, p_tl);
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
String actual = rect.toString();
|
||||
String expected = "{0, 0, 10x10}";
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,149 +7,158 @@ import org.opencv.core.Size;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class RotatedRectTest extends OpenCVTestCase {
|
||||
|
||||
private double angle;
|
||||
private Point center;
|
||||
private Size size;
|
||||
|
||||
|
||||
private double angle;
|
||||
private Point center;
|
||||
private Size size;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
center = new Point(matSize/2, matSize/2);
|
||||
size = new Size(matSize/4, matSize/2);
|
||||
|
||||
center = new Point(matSize / 2, matSize / 2);
|
||||
size = new Size(matSize / 4, matSize / 2);
|
||||
angle = 40;
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("core.RotatedRect");
|
||||
}
|
||||
|
||||
public void testBoundingRect() {
|
||||
assertEquals(size.height, size.width);
|
||||
double length = size.height;
|
||||
|
||||
angle = 45;
|
||||
RotatedRect rr = new RotatedRect(center, size, angle);
|
||||
|
||||
Rect r = rr.boundingRect();
|
||||
double halfDiagonal = length * Math.sqrt(2)/2;
|
||||
|
||||
assertTrue((r.x == Math.floor(center.x - halfDiagonal)) &&
|
||||
(r.y == Math.floor(center.y - halfDiagonal)));
|
||||
|
||||
assertTrue((r.br().x >= Math.ceil(center.x + halfDiagonal)) &&
|
||||
(r.br().y >= Math.ceil(center.y + halfDiagonal)));
|
||||
|
||||
assertTrue((r.br().x - Math.ceil(center.x + halfDiagonal)) <= 1 &&
|
||||
(r.br().y - Math.ceil(center.y + halfDiagonal)) <= 1);
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
RotatedRect rrect = new RotatedRect(center, size, angle);
|
||||
RotatedRect clone = rrect.clone();
|
||||
|
||||
assertTrue(clone != null);
|
||||
assertTrue(rrect.center.equals(clone.center));
|
||||
assertTrue(rrect.size.equals(clone.size));
|
||||
assertTrue(rrect.angle == clone.angle);
|
||||
}
|
||||
|
||||
public void testEqualsObject() {
|
||||
Point center2 = new Point(matSize/3, matSize/1.5);
|
||||
Size size2 = new Size(matSize/2, matSize/4);
|
||||
double angle2 = 0;
|
||||
public void test_1() {
|
||||
super.test_1("core.RotatedRect");
|
||||
}
|
||||
|
||||
RotatedRect rrect1 = new RotatedRect(center, size, angle);
|
||||
RotatedRect rrect2 = new RotatedRect(center2, size2, angle2);
|
||||
RotatedRect rrect3 = rrect1;
|
||||
RotatedRect clone1 = rrect1.clone();
|
||||
RotatedRect clone2 = rrect2.clone();
|
||||
public void testBoundingRect() {
|
||||
size = new Size(matSize / 2, matSize / 2);
|
||||
assertEquals(size.height, size.width);
|
||||
double length = size.height;
|
||||
|
||||
assertTrue(rrect1.equals(rrect3));
|
||||
assertTrue(!rrect1.equals(rrect2));
|
||||
angle = 45;
|
||||
RotatedRect rr = new RotatedRect(center, size, angle);
|
||||
|
||||
assertTrue(rrect2.equals(clone2));
|
||||
clone2.angle = 10;
|
||||
assertTrue(!rrect2.equals(clone2));
|
||||
|
||||
assertTrue(rrect1.equals(clone1));
|
||||
|
||||
clone1.center.x += 1;
|
||||
assertTrue(!rrect1.equals(clone1));
|
||||
Rect r = rr.boundingRect();
|
||||
double halfDiagonal = length * Math.sqrt(2) / 2;
|
||||
|
||||
clone1.center.x -= 1;
|
||||
assertTrue(rrect1.equals(clone1));
|
||||
|
||||
clone1.size.width += 1;
|
||||
assertTrue(!rrect1.equals(clone1));
|
||||
|
||||
assertTrue(!rrect1.equals(size));
|
||||
}
|
||||
assertTrue((r.x == Math.floor(center.x - halfDiagonal)) && (r.y == Math.floor(center.y - halfDiagonal)));
|
||||
|
||||
public void testPoints() {
|
||||
RotatedRect rrect = new RotatedRect(center, size, angle);
|
||||
|
||||
Point p[] = new Point[4];
|
||||
rrect.points(p);
|
||||
|
||||
boolean is_p0_irrational = (100 * p[0].x != (int)(100 * p[0].x)) && (100 * p[0].y != (int)(100 * p[0].y));
|
||||
boolean is_p1_irrational = (100 * p[1].x != (int)(100 * p[1].x)) && (100 * p[1].y != (int)(100 * p[1].y));
|
||||
boolean is_p2_irrational = (100 * p[2].x != (int)(100 * p[2].x)) && (100 * p[2].y != (int)(100 * p[2].y));
|
||||
boolean is_p3_irrational = (100 * p[3].x != (int)(100 * p[3].x)) && (100 * p[3].y != (int)(100 * p[3].y));
|
||||
|
||||
assertTrue(is_p0_irrational && is_p1_irrational && is_p2_irrational && is_p3_irrational);
|
||||
|
||||
assertTrue("Symmetric points 0 and 2",
|
||||
Math.abs((p[0].x + p[2].x)/2 - center.x) + Math.abs((p[0].y + p[2].y)/2 - center.y) < EPS);
|
||||
|
||||
assertTrue("Symmetric points 1 and 3",
|
||||
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);
|
||||
|
||||
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);
|
||||
assertTrue((r.br().x >= Math.ceil(center.x + halfDiagonal)) && (r.br().y >= Math.ceil(center.y + halfDiagonal)));
|
||||
|
||||
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);
|
||||
assertTrue((r.br().x - Math.ceil(center.x + halfDiagonal)) <= 1 && (r.br().y - Math.ceil(center.y + halfDiagonal)) <= 1);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
public void testClone() {
|
||||
RotatedRect rrect = new RotatedRect(center, size, angle);
|
||||
RotatedRect clone = rrect.clone();
|
||||
|
||||
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);
|
||||
assertTrue(clone != null);
|
||||
assertTrue(rrect.center.equals(clone.center));
|
||||
assertTrue(rrect.size.equals(clone.size));
|
||||
assertTrue(rrect.angle == clone.angle);
|
||||
}
|
||||
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
Point center2 = new Point(matSize / 3, matSize / 1.5);
|
||||
Size size2 = new Size(matSize / 2, matSize / 4);
|
||||
double angle2 = 0;
|
||||
|
||||
public void testRotatedRect() {
|
||||
RotatedRect rr = new RotatedRect();
|
||||
|
||||
assertTrue(rr != null);
|
||||
assertTrue(rr.center != null);
|
||||
assertTrue(rr.size != null);
|
||||
assertTrue(rr.angle == 0.0);
|
||||
}
|
||||
RotatedRect rrect1 = new RotatedRect(center, size, angle);
|
||||
RotatedRect rrect2 = new RotatedRect(center2, size2, angle2);
|
||||
RotatedRect rrect3 = rrect1;
|
||||
RotatedRect clone1 = rrect1.clone();
|
||||
RotatedRect clone2 = rrect2.clone();
|
||||
|
||||
public void testRotatedRectDoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
//public RotatedRect(double[] vals)
|
||||
}
|
||||
|
||||
public void testRotatedRectPointSizeDouble() {
|
||||
RotatedRect rr = new RotatedRect(center, size, 40);
|
||||
|
||||
assertTrue(rr != null);
|
||||
assertTrue(rr.center != null);
|
||||
assertTrue(rr.size != null);
|
||||
assertTrue(rr.angle == 40.0);
|
||||
}
|
||||
assertTrue(rrect1.equals(rrect3));
|
||||
assertTrue(!rrect1.equals(rrect2));
|
||||
|
||||
assertTrue(rrect2.equals(clone2));
|
||||
clone2.angle = 10;
|
||||
assertTrue(!rrect2.equals(clone2));
|
||||
|
||||
assertTrue(rrect1.equals(clone1));
|
||||
|
||||
clone1.center.x += 1;
|
||||
assertTrue(!rrect1.equals(clone1));
|
||||
|
||||
clone1.center.x -= 1;
|
||||
assertTrue(rrect1.equals(clone1));
|
||||
|
||||
clone1.size.width += 1;
|
||||
assertTrue(!rrect1.equals(clone1));
|
||||
|
||||
assertTrue(!rrect1.equals(size));
|
||||
}
|
||||
|
||||
public void testPoints() {
|
||||
RotatedRect rrect = new RotatedRect(center, size, angle);
|
||||
|
||||
Point p[] = new Point[4];
|
||||
rrect.points(p);
|
||||
|
||||
boolean is_p0_irrational = (100 * p[0].x != (int) (100 * p[0].x)) && (100 * p[0].y != (int) (100 * p[0].y));
|
||||
boolean is_p1_irrational = (100 * p[1].x != (int) (100 * p[1].x)) && (100 * p[1].y != (int) (100 * p[1].y));
|
||||
boolean is_p2_irrational = (100 * p[2].x != (int) (100 * p[2].x)) && (100 * p[2].y != (int) (100 * p[2].y));
|
||||
boolean is_p3_irrational = (100 * p[3].x != (int) (100 * p[3].x)) && (100 * p[3].y != (int) (100 * p[3].y));
|
||||
|
||||
assertTrue(is_p0_irrational && is_p1_irrational && is_p2_irrational && is_p3_irrational);
|
||||
|
||||
assertTrue("Symmetric points 0 and 2",
|
||||
Math.abs((p[0].x + p[2].x) / 2 - center.x) + Math.abs((p[0].y + p[2].y) / 2 - center.y) < EPS);
|
||||
|
||||
assertTrue("Symmetric points 1 and 3",
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public void testRotatedRect() {
|
||||
RotatedRect rr = new RotatedRect();
|
||||
|
||||
assertTrue(rr != null);
|
||||
assertTrue(rr.center != null);
|
||||
assertTrue(rr.size != null);
|
||||
assertTrue(rr.angle == 0.0);
|
||||
}
|
||||
|
||||
public void testRotatedRectDoubleArray() {
|
||||
double[] vals = {1, 2, 3, 4, 5};
|
||||
RotatedRect rr = new RotatedRect(vals);
|
||||
|
||||
assertNotNull(rr);
|
||||
assertEquals(1., rr.center.x);
|
||||
assertEquals(2., rr.center.y);
|
||||
assertEquals(3., rr.size.width);
|
||||
assertEquals(4., rr.size.height);
|
||||
assertEquals(5., rr.angle);
|
||||
}
|
||||
|
||||
public void testRotatedRectPointSizeDouble() {
|
||||
RotatedRect rr = new RotatedRect(center, size, 40);
|
||||
|
||||
assertTrue(rr != null);
|
||||
assertTrue(rr.center != null);
|
||||
assertTrue(rr.size != null);
|
||||
assertTrue(rr.angle == 40.0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,63 +1,100 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.Scalar;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class ScalarTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
private Scalar s1;
|
||||
private Scalar s2;
|
||||
private Scalar dstScalar;
|
||||
|
||||
public void testAll() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
s1 = new Scalar(1.0);
|
||||
s2 = Scalar.all(1.0);
|
||||
dstScalar = null;
|
||||
}
|
||||
|
||||
public void testConj() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testAll() {
|
||||
dstScalar = Scalar.all(2.0);
|
||||
Scalar truth = new Scalar(2.0, 2.0, 2.0, 2.0);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
public void testEqualsObject() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClone() {
|
||||
dstScalar = s2.clone();
|
||||
assertEquals(s2, dstScalar);
|
||||
}
|
||||
|
||||
public void testIsReal() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testConj() {
|
||||
dstScalar = s2.conj();
|
||||
Scalar truth = new Scalar(1, -1, -1, -1);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
public void testMulScalar() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
dstScalar = s2.clone();
|
||||
assertTrue(s2.equals(dstScalar));
|
||||
|
||||
public void testMulScalarDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertFalse(s2.equals(s1));
|
||||
}
|
||||
|
||||
public void testScalarDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testIsReal() {
|
||||
assertTrue(s1.isReal());
|
||||
|
||||
public void testScalarDoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertFalse(s2.isReal());
|
||||
}
|
||||
|
||||
public void testScalarDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testMulScalar() {
|
||||
dstScalar = s2.mul(s1);
|
||||
assertEquals(s1, dstScalar);
|
||||
}
|
||||
|
||||
public void testScalarDoubleDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testMulScalarDouble() {
|
||||
double multiplier = 2.0;
|
||||
dstScalar = s2.mul(s1, multiplier);
|
||||
Scalar truth = new Scalar(2);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
public void testScalarDoubleDoubleDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testScalarDouble() {
|
||||
Scalar truth = new Scalar(1);
|
||||
assertEquals(truth, s1);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
public void testScalarDoubleDouble() {
|
||||
dstScalar = new Scalar(2, 5);
|
||||
Scalar truth = new Scalar(2.0, 5.0, 0.0, 0.0);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
public void testScalarDoubleDoubleDouble() {
|
||||
dstScalar = new Scalar(2.0, 5.0, 5.0);
|
||||
Scalar truth = new Scalar(2.0, 5.0, 5.0, 0.0);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
public void testScalarDoubleDoubleDoubleDouble() {
|
||||
dstScalar = new Scalar(2.0, 5.0, 5.0, 9.0);
|
||||
Scalar truth = new Scalar(2.0, 5.0, 5.0, 9.0);
|
||||
assertEquals(truth, dstScalar);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
double[] vals = { 1.0, 1.0, 1.0, 1.0 };
|
||||
s1.set(vals);
|
||||
assertEquals(s2, s1);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,43 +1,83 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Size;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class SizeTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
Size sz1;
|
||||
Size sz2;
|
||||
Size dstSize;
|
||||
|
||||
public void testArea() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
sz1 = new Size(10.0, 10.0);
|
||||
sz2 = new Size(-1, -1);
|
||||
dstSize = null;
|
||||
}
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testArea() {
|
||||
double area = sz1.area();
|
||||
assertEquals(100.0, area);
|
||||
}
|
||||
|
||||
public void testEqualsObject() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClone() {
|
||||
dstSize = sz1.clone();
|
||||
assertEquals(sz1, dstSize);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
assertFalse(sz1.equals(sz2));
|
||||
|
||||
public void testSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
sz2 = sz1.clone();
|
||||
assertTrue(sz1.equals(sz2));
|
||||
}
|
||||
|
||||
public void testSizeDoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
sz2.set(vals1);
|
||||
assertEquals(0., sz2.width);
|
||||
assertEquals(0., sz2.height);
|
||||
|
||||
public void testSizeDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
double[] vals2 = { 9, 12 };
|
||||
sz1 .set(vals2);
|
||||
assertEquals(9., sz1.width);
|
||||
assertEquals(12., sz1.height);
|
||||
}
|
||||
|
||||
public void testSizePoint() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSize() {
|
||||
dstSize = new Size();
|
||||
|
||||
assertNotNull(dstSize);
|
||||
assertEquals(0., dstSize.width);
|
||||
assertEquals(0., dstSize.height);
|
||||
}
|
||||
|
||||
public void testSizeDoubleArray() {
|
||||
double[] vals = { 10, 20 };
|
||||
sz2 = new Size(vals);
|
||||
|
||||
assertEquals(10., sz2.width);
|
||||
assertEquals(20., sz2.height);
|
||||
}
|
||||
|
||||
public void testSizeDoubleDouble() {
|
||||
assertNotNull(sz1);
|
||||
|
||||
assertEquals(10.0, sz1.width);
|
||||
assertEquals(10.0, sz1.height);
|
||||
}
|
||||
|
||||
public void testSizePoint() {
|
||||
Point p = new Point(2, 4);
|
||||
sz1 = new Size(p);
|
||||
|
||||
assertNotNull(sz1);
|
||||
assertEquals(2.0, sz1.width);
|
||||
assertEquals(4.0, sz1.height);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,39 +1,81 @@
|
||||
package org.opencv.test.core;
|
||||
|
||||
import org.opencv.core.TermCriteria;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class TermCriteriaTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
private TermCriteria tc1;
|
||||
private TermCriteria tc2;
|
||||
|
||||
public void testClone() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
tc1 = new TermCriteria();
|
||||
tc2 = new TermCriteria(2, 4, EPS);
|
||||
}
|
||||
|
||||
public void testEqualsObject() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClone() {
|
||||
tc1 = tc2.clone();
|
||||
assertEquals(tc2, tc1);
|
||||
}
|
||||
|
||||
public void testSet() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEqualsObject() {
|
||||
assertFalse(tc2.equals(tc1));
|
||||
|
||||
public void testTermCriteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
tc1 = tc2.clone();
|
||||
assertTrue(tc2.equals(tc1));
|
||||
}
|
||||
|
||||
public void testTermCriteriaDoubleArray() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet() {
|
||||
double[] vals1 = {};
|
||||
tc1.set(vals1);
|
||||
|
||||
public void testTermCriteriaIntIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
assertEquals(0, tc1.type);
|
||||
assertEquals(0, tc1.maxCount);
|
||||
assertEquals(0.0, tc1.epsilon);
|
||||
|
||||
public void testToString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
double[] vals2 = { 9, 8, 0.002 };
|
||||
tc2.set(vals2);
|
||||
|
||||
assertEquals(9, tc2.type);
|
||||
assertEquals(8, tc2.maxCount);
|
||||
assertEquals(0.002, tc2.epsilon);
|
||||
}
|
||||
|
||||
public void testTermCriteria() {
|
||||
tc1 = new TermCriteria();
|
||||
|
||||
assertNotNull(tc1);
|
||||
assertEquals(0, tc1.type);
|
||||
assertEquals(0, tc1.maxCount);
|
||||
assertEquals(0.0, tc1.epsilon);
|
||||
}
|
||||
|
||||
public void testTermCriteriaDoubleArray() {
|
||||
double[] vals = { 3, 2, 0.007 };
|
||||
tc1 = new TermCriteria(vals);
|
||||
|
||||
assertEquals(3, tc1.type);
|
||||
assertEquals(2, tc1.maxCount);
|
||||
assertEquals(0.007, tc1.epsilon);
|
||||
}
|
||||
|
||||
public void testTermCriteriaIntIntDouble() {
|
||||
tc1 = new TermCriteria(2, 4, EPS);
|
||||
|
||||
assertNotNull(tc2);
|
||||
assertEquals(2, tc2.type);
|
||||
assertEquals(4, tc2.maxCount);
|
||||
assertEquals(EPS, tc2.epsilon);
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
String actual = tc2.toString();
|
||||
String expected = "{ type: 2, maxCount: 4, epsilon: 0.001}";
|
||||
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class coreTest extends OpenCVTestCase {
|
||||
Mat mean = new Mat(1, matSize, CvType.CV_64FC1);
|
||||
|
||||
Core.calcCovarMatrix(gray0_32f, covar, mean, Core.COVAR_ROWS | Core.COVAR_NORMAL);
|
||||
|
||||
|
||||
assertMatEqual(gray0_64f, covar, EPS);
|
||||
assertMatEqual(gray0_64f_1d, mean, EPS);
|
||||
}
|
||||
@ -151,8 +151,7 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testCheckRangeMat() {
|
||||
Mat outOfRange = new Mat(2, 2, CvType.CV_64F);
|
||||
outOfRange.put(0, 0, Double.NaN, Double.NEGATIVE_INFINITY,
|
||||
Double.POSITIVE_INFINITY, 0);
|
||||
outOfRange.put(0, 0, Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, 0);
|
||||
|
||||
assertTrue(Core.checkRange(grayRnd_32f));
|
||||
assertTrue(Core.checkRange(new Mat()));
|
||||
@ -161,8 +160,7 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testCheckRangeMatBoolean() {
|
||||
Mat outOfRange = new Mat(2, 2, CvType.CV_64F);
|
||||
outOfRange.put(0, 0, Double.NaN, Double.NEGATIVE_INFINITY,
|
||||
Double.POSITIVE_INFINITY, 0);
|
||||
outOfRange.put(0, 0, Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, 0);
|
||||
|
||||
assertFalse(Core.checkRange(outOfRange, true));
|
||||
|
||||
@ -336,12 +334,10 @@ public class coreTest extends OpenCVTestCase {
|
||||
assertMatEqual(gray0_32f_1d, dst, EPS);
|
||||
|
||||
Mat in = new Mat(1, 8, CvType.CV_32F);
|
||||
in.put(0, 0, 0.203056, 0.980407, 0.35312, -0.106651, 0.0399382,
|
||||
0.871475, -0.648355, 0.501067);
|
||||
in.put(0, 0, 0.203056, 0.980407, 0.35312, -0.106651, 0.0399382, 0.871475, -0.648355, 0.501067);
|
||||
|
||||
truth = new Mat(1, 8, CvType.CV_32F);
|
||||
truth.put(0, 0, 0.77571625, 0.37270021, 0.18529896, 0.012146413,
|
||||
-0.32499927, -0.99302113, 0.55979407, -0.6251272);
|
||||
truth.put(0, 0, 0.77571625, 0.37270021, 0.18529896, 0.012146413, -0.32499927, -0.99302113, 0.55979407, -0.6251272);
|
||||
|
||||
Core.dct(in, dst);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
@ -476,10 +472,10 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testFillConvexPolyMatMatScalar() {
|
||||
List<Point> lp = new ArrayList<Point>(4);
|
||||
lp.add( new Point(1, 1) );
|
||||
lp.add( new Point(5, 0) );
|
||||
lp.add( new Point(6, 8) );
|
||||
lp.add( new Point(0, 9) );
|
||||
lp.add(new Point(1, 1));
|
||||
lp.add(new Point(5, 0));
|
||||
lp.add(new Point(6, 8));
|
||||
lp.add(new Point(0, 9));
|
||||
Mat points = Converters.vector_Point_to_Mat(lp);
|
||||
assertTrue(0 == Core.countNonZero(gray0));
|
||||
|
||||
@ -492,10 +488,10 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testFillConvexPolyMatMatScalarInt() {
|
||||
List<Point> lp = new ArrayList<Point>(4);
|
||||
lp.add( new Point(1, 1) );
|
||||
lp.add( new Point(5, 0) );
|
||||
lp.add( new Point(6, 8) );
|
||||
lp.add( new Point(0, 9) );
|
||||
lp.add(new Point(1, 1));
|
||||
lp.add(new Point(5, 0));
|
||||
lp.add(new Point(6, 8));
|
||||
lp.add(new Point(0, 9));
|
||||
Mat points = Converters.vector_Point_to_Mat(lp);
|
||||
assertTrue(0 == Core.countNonZero(gray0));
|
||||
|
||||
@ -508,16 +504,16 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testFillConvexPolyMatMatScalarIntInt() {
|
||||
List<Point> lp = new ArrayList<Point>(4);
|
||||
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, 1));
|
||||
lp.add(new Point(5, 1));
|
||||
lp.add(new Point(5, 8));
|
||||
lp.add(new Point(1, 8));
|
||||
Mat points = Converters.vector_Point_to_Mat(lp);
|
||||
List<Point> lp2 = new ArrayList<Point>(4);
|
||||
lp2.add( new Point(2, 2) );
|
||||
lp2.add( new Point(10, 2) );
|
||||
lp2.add( new Point(10, 17) ); //TODO: don't know why '16' fails the test
|
||||
lp2.add( new Point(2, 17) ); //TODO: don't know why '16' fails the test
|
||||
lp2.add(new Point(2, 2));
|
||||
lp2.add(new Point(10, 2));
|
||||
lp2.add(new Point(10, 17)); // TODO: don't know why '16' fails the test
|
||||
lp2.add(new Point(2, 17)); // TODO: don't know why '16' fails the test
|
||||
Mat points2 = Converters.vector_Point_to_Mat(lp2);
|
||||
assertTrue(0 == Core.countNonZero(gray0));
|
||||
|
||||
@ -654,8 +650,7 @@ public class coreTest extends OpenCVTestCase {
|
||||
in.put(0, 0, 1.0, 2.0, 1.0, 0.0, 1.0, 2.0, 3.0, 1.0);
|
||||
|
||||
truth = new Mat(1, 8, CvType.CV_32F);
|
||||
truth.put(0, 0, 3.3769724, -1.6215782, 2.3608727, 0.20730907,
|
||||
-0.86502546, 0.028082132, -0.7673766, 0.10917115);
|
||||
truth.put(0, 0, 3.3769724, -1.6215782, 2.3608727, 0.20730907, -0.86502546, 0.028082132, -0.7673766, 0.10917115);
|
||||
|
||||
Core.idct(in, dst);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
@ -666,8 +661,7 @@ public class coreTest extends OpenCVTestCase {
|
||||
in.put(0, 0, 1.0, 2.0, 1.0, 0.0, 1.0, 2.0, 3.0, 1.0);
|
||||
|
||||
truth = new Mat(1, 8, CvType.CV_32F);
|
||||
truth.put(0, 0, 3.3769724, -1.6215782, 2.3608727, 0.20730907,
|
||||
-0.86502546, 0.028082132, -0.7673766, 0.10917115);
|
||||
truth.put(0, 0, 3.3769724, -1.6215782, 2.3608727, 0.20730907, -0.86502546, 0.028082132, -0.7673766, 0.10917115);
|
||||
|
||||
Core.idct(in, dst, Core.DCT_ROWS);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
@ -705,13 +699,13 @@ public class coreTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testInRange() {
|
||||
gray0.put(1, 1, 100, 150, 200);
|
||||
gray0.put(1, 1, 100, 150, 200);
|
||||
Core.inRange(gray0, new Scalar(120), new Scalar(160), dst);
|
||||
byte vals[] = new byte[3];
|
||||
dst.get(1, 1, vals);
|
||||
assertEquals(0, vals[0]);
|
||||
assertEquals(0, vals[0]);
|
||||
assertEquals(-1, vals[1]);
|
||||
assertEquals(0, vals[2]);
|
||||
assertEquals(0, vals[2]);
|
||||
assertEquals(1, Core.countNonZero(dst));
|
||||
}
|
||||
|
||||
@ -900,8 +894,7 @@ public class coreTest extends OpenCVTestCase {
|
||||
assertEquals(0, Core.countNonZero(mean));
|
||||
assertEquals(0, Core.countNonZero(stddev));
|
||||
|
||||
Mat submat = grayRnd.submat(0, grayRnd.rows() / 2, 0,
|
||||
grayRnd.cols() / 2);
|
||||
Mat submat = grayRnd.submat(0, grayRnd.rows() / 2, 0, grayRnd.cols() / 2);
|
||||
submat.setTo(new Scalar(33));
|
||||
|
||||
Mat mask = gray0.clone();
|
||||
@ -953,31 +946,35 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testMixChannels() {
|
||||
rgba0.setTo(new Scalar(10, 20, 30, 40));
|
||||
|
||||
|
||||
List<Mat> result = new ArrayList<Mat>();
|
||||
Core.split(rgba0, result);
|
||||
assertEquals(10, (int) result.get(0).get(0, 0)[0]);
|
||||
assertEquals(20, (int) result.get(1).get(0, 0)[0]);
|
||||
assertEquals(30, (int) result.get(2).get(0, 0)[0]);
|
||||
assertEquals(40, (int) result.get(3).get(0, 0)[0]);
|
||||
|
||||
|
||||
List<Mat> src = new ArrayList<Mat>(1);
|
||||
src.add(rgba0);
|
||||
|
||||
|
||||
List<Mat> dst = new ArrayList<Mat>(4);
|
||||
dst.add(gray3);
|
||||
dst.add(gray2);
|
||||
dst.add(gray1);
|
||||
dst.add(gray0);
|
||||
|
||||
|
||||
List<Integer> fromTo = new ArrayList<Integer>(8);
|
||||
fromTo.add(0); fromTo.add(3);
|
||||
fromTo.add(1); fromTo.add(2);
|
||||
fromTo.add(2); fromTo.add(1);
|
||||
fromTo.add(3); fromTo.add(0);
|
||||
|
||||
fromTo.add(0);
|
||||
fromTo.add(3);
|
||||
fromTo.add(1);
|
||||
fromTo.add(2);
|
||||
fromTo.add(2);
|
||||
fromTo.add(1);
|
||||
fromTo.add(3);
|
||||
fromTo.add(0);
|
||||
|
||||
Core.mixChannels(src, dst, fromTo);
|
||||
|
||||
|
||||
assertMatEqual(result.get(0), gray0);
|
||||
assertMatEqual(result.get(1), gray1);
|
||||
assertMatEqual(result.get(2), gray2);
|
||||
@ -1155,26 +1152,26 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testPerspectiveTransform() {
|
||||
Mat src = new Mat(matSize, matSize, CvType.CV_32FC2);
|
||||
|
||||
|
||||
Core.randu(src, 0, 256);
|
||||
|
||||
//FIXME: use Mat.diag
|
||||
|
||||
// FIXME: use Mat.diag
|
||||
Mat transformMatrix = Mat.eye(3, 3, CvType.CV_32F);
|
||||
|
||||
|
||||
Core.perspectiveTransform(src, dst, transformMatrix);
|
||||
|
||||
|
||||
assertMatEqual(src, dst, EPS);
|
||||
}
|
||||
|
||||
|
||||
public void testPerspectiveTransform3D() {
|
||||
Mat src = new Mat(matSize, matSize, CvType.CV_32FC3);
|
||||
|
||||
|
||||
Core.randu(src, 0, 256);
|
||||
|
||||
|
||||
Mat transformMatrix = Mat.eye(4, 4, CvType.CV_32F);
|
||||
|
||||
|
||||
Core.perspectiveTransform(src, dst, transformMatrix);
|
||||
|
||||
|
||||
assertMatEqual(src, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1233,8 +1230,8 @@ public class coreTest extends OpenCVTestCase {
|
||||
pts.add(new Point(7, 6));
|
||||
pts.add(new Point(1, 6));
|
||||
List<Mat> mats = new ArrayList<Mat>();
|
||||
mats.add( Converters.vector_Point_to_Mat(pts) );
|
||||
|
||||
mats.add(Converters.vector_Point_to_Mat(pts));
|
||||
|
||||
assertEquals(0, Core.countNonZero(img));
|
||||
Core.polylines(img, mats, true, new Scalar(100));
|
||||
assertEquals(22, Core.countNonZero(img));
|
||||
@ -1250,8 +1247,8 @@ public class coreTest extends OpenCVTestCase {
|
||||
pts.add(new Point(7, 6));
|
||||
pts.add(new Point(1, 6));
|
||||
List<Mat> mats = new ArrayList<Mat>();
|
||||
mats.add( Converters.vector_Point_to_Mat(pts) );
|
||||
|
||||
mats.add(Converters.vector_Point_to_Mat(pts));
|
||||
|
||||
assertEquals(0, Core.countNonZero(img));
|
||||
Core.polylines(img, mats, true, new Scalar(100), 2);
|
||||
assertEquals(62, Core.countNonZero(img));
|
||||
@ -1259,21 +1256,25 @@ public class coreTest extends OpenCVTestCase {
|
||||
|
||||
public void testPolylinesMatListOfMatBooleanScalarIntInt() {
|
||||
Mat img = gray0;
|
||||
List<Point> pts = new ArrayList<Point>();
|
||||
List<Point> pts = new ArrayList<Point>();
|
||||
List<Point> pts2 = new ArrayList<Point>();
|
||||
pts.add(new Point(1, 1)); pts2.add(new Point(2, 2));
|
||||
pts.add(new Point(7, 1)); pts2.add(new Point(14, 2));
|
||||
pts.add(new Point(7, 6)); pts2.add(new Point(14, 12));
|
||||
pts.add(new Point(1, 6)); pts2.add(new Point(2, 12));
|
||||
List<Mat> mats = new ArrayList<Mat>();
|
||||
pts.add(new Point(1, 1));
|
||||
pts2.add(new Point(2, 2));
|
||||
pts.add(new Point(7, 1));
|
||||
pts2.add(new Point(14, 2));
|
||||
pts.add(new Point(7, 6));
|
||||
pts2.add(new Point(14, 12));
|
||||
pts.add(new Point(1, 6));
|
||||
pts2.add(new Point(2, 12));
|
||||
List<Mat> mats = new ArrayList<Mat>();
|
||||
List<Mat> mats2 = new ArrayList<Mat>();
|
||||
mats.add( Converters.vector_Point_to_Mat(pts) );
|
||||
mats2.add( Converters.vector_Point_to_Mat(pts2) );
|
||||
|
||||
mats.add(Converters.vector_Point_to_Mat(pts));
|
||||
mats2.add(Converters.vector_Point_to_Mat(pts2));
|
||||
|
||||
assertTrue(0 == Core.countNonZero(img));
|
||||
Core.polylines(img, mats, true, new Scalar(100), 2, 8, 0);
|
||||
Core.polylines(img, mats, true, new Scalar(100), 2, 8, 0);
|
||||
assertFalse(0 == Core.countNonZero(img));
|
||||
Core.polylines(img, mats2, true, new Scalar(0), 2, 8, 1);
|
||||
Core.polylines(img, mats2, true, new Scalar(0), 2, 8, 1);
|
||||
assertTrue(0 == Core.countNonZero(img));
|
||||
}
|
||||
|
||||
@ -1584,8 +1585,7 @@ public class coreTest extends OpenCVTestCase {
|
||||
Mat subgray0 = gray0.submat(0, gray0.rows() / 2, 0, gray0.cols());
|
||||
Mat destination = new Mat(matSize, matSize, CvType.CV_8U);
|
||||
destination.setTo(new Scalar(0));
|
||||
Mat subdst = destination.submat(0, destination.rows(), 0,
|
||||
destination.cols() / 2);
|
||||
Mat subdst = destination.submat(0, destination.rows(), 0, destination.cols() / 2);
|
||||
subgray0.setTo(new Scalar(1));
|
||||
Core.transpose(gray0, destination);
|
||||
assertTrue(subdst.total() == Core.countNonZero(subdst));
|
||||
|
@ -4,99 +4,102 @@ import org.opencv.features2d.KeyPoint;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class KeyPointTest extends OpenCVTestCase {
|
||||
|
||||
private KeyPoint keyPoint;
|
||||
private float size;
|
||||
private float x;
|
||||
private float y;
|
||||
|
||||
@Override
|
||||
private KeyPoint keyPoint;
|
||||
private float size;
|
||||
private float x;
|
||||
private float y;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
keyPoint = null;
|
||||
x = 1.0f;
|
||||
y = 2.0f;
|
||||
size = 3.0f;
|
||||
x = 1.0f;
|
||||
y = 2.0f;
|
||||
size = 3.0f;
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("features2d.KeyPoint");
|
||||
}
|
||||
public void test_1() {
|
||||
super.test_1("features2d.KeyPoint");
|
||||
}
|
||||
|
||||
public void testGet_angle() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_angle() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_class_id() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_class_id() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_octave() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_octave() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_pt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_pt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_response() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_response() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_size() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKeyPoint() {
|
||||
keyPoint = new KeyPoint();
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size, 10.0f);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testGet_size() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testKeyPoint() {
|
||||
keyPoint = new KeyPoint();
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
public void testKeyPointFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
public void testKeyPointFloatFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size, 10.0f);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
public void testKeyPointFloatFloatFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloatFloatInt() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f, 1);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloatFloatIntInt() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f, 1, 1);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f, 1);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testSet_angle() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testKeyPointFloatFloatFloatFloatFloatIntInt() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f, 1, 1);
|
||||
assertTrue(null != keyPoint);
|
||||
}
|
||||
|
||||
public void testSet_class_id() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_angle() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_octave() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_class_id() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_pt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_octave() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_response() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_pt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_size() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_response() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_size() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,28 +4,28 @@ import org.opencv.features2d.MSER;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class MSERTest extends OpenCVTestCase {
|
||||
|
||||
private MSER mser;
|
||||
|
||||
|
||||
private MSER mser;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
mser = null;
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("FEATURES2D.MSER");
|
||||
}
|
||||
|
||||
public void testMSER() {
|
||||
mser = new MSER();
|
||||
assertTrue(null != mser);
|
||||
}
|
||||
public void test_1() {
|
||||
super.test_1("FEATURES2D.MSER");
|
||||
}
|
||||
|
||||
public void testMSERIntIntIntDoubleDoubleIntDoubleDoubleInt() {
|
||||
mser = new MSER(5, 60, 14400, .25f, .2f, 200, 1.01, .003, 5);
|
||||
assertTrue(null != mser);
|
||||
}
|
||||
public void testMSER() {
|
||||
mser = new MSER();
|
||||
assertTrue(null != mser);
|
||||
}
|
||||
|
||||
public void testMSERIntIntIntDoubleDoubleIntDoubleDoubleInt() {
|
||||
mser = new MSER(5, 60, 14400, .25f, .2f, 200, 1.01, .003, 5);
|
||||
assertTrue(null != mser);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,25 +28,18 @@ public class SURFTest extends OpenCVTestCase {
|
||||
protected void setUp() throws Exception {
|
||||
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) };
|
||||
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 getCross() {
|
||||
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);
|
||||
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;
|
||||
}
|
||||
@ -75,9 +68,9 @@ public class SURFTest extends OpenCVTestCase {
|
||||
SURF surf = new SURF(8000);
|
||||
List<KeyPoint> keypoints = new LinkedList<KeyPoint>();
|
||||
Mat gray0 = new Mat(matSize, matSize, CvType.CV_8U, new Scalar(255));
|
||||
|
||||
|
||||
surf.detect(gray0, new Mat(), keypoints);
|
||||
|
||||
|
||||
assertEquals(0, keypoints.size());
|
||||
}
|
||||
|
||||
@ -85,9 +78,9 @@ public class SURFTest extends OpenCVTestCase {
|
||||
SURF surf = new SURF(8000);
|
||||
List<KeyPoint> keypoints = new LinkedList<KeyPoint>();
|
||||
Mat cross = getCross();
|
||||
|
||||
|
||||
surf.detect(cross, new Mat(), keypoints);
|
||||
|
||||
|
||||
assertEquals(truth.length, keypoints.size());
|
||||
order(keypoints);
|
||||
for (int i = 0; i < truth.length; i++)
|
||||
@ -102,9 +95,9 @@ public class SURFTest extends OpenCVTestCase {
|
||||
List<KeyPoint> keypoints = new LinkedList<KeyPoint>();
|
||||
List<Float> descriptors = new LinkedList<Float>();
|
||||
Mat cross = getCross();
|
||||
|
||||
|
||||
surf.detect(cross, new Mat(), keypoints, descriptors);
|
||||
|
||||
|
||||
assertEquals(truth.length, keypoints.size());
|
||||
assertEquals(truth.length * surf.descriptorSize(), descriptors.size());
|
||||
order(keypoints);
|
||||
@ -124,12 +117,10 @@ public class SURFTest extends OpenCVTestCase {
|
||||
// unmodified keypoints
|
||||
assertEquals(original_keypoints.size(), keypoints.size());
|
||||
for (int i = 0; i < keypoints.size(); i++)
|
||||
assertKeyPointEqual(original_keypoints.get(i), keypoints.get(i),
|
||||
EPS);
|
||||
assertKeyPointEqual(original_keypoints.get(i), keypoints.get(i), EPS);
|
||||
|
||||
// zero descriptors
|
||||
assertEquals(surf.descriptorSize() * original_keypoints.size(),
|
||||
descriptors.size());
|
||||
assertEquals(surf.descriptorSize() * original_keypoints.size(), descriptors.size());
|
||||
for (float d : descriptors)
|
||||
assertTrue(Math.abs(d) < EPS);
|
||||
}
|
||||
|
@ -17,14 +17,13 @@ public class StarDetectorTest extends OpenCVTestCase {
|
||||
public void test_1() {
|
||||
super.test_1("FEATURES2D.StarDetector");
|
||||
}
|
||||
|
||||
private Mat getStarImg()
|
||||
{
|
||||
|
||||
private Mat getStarImg() {
|
||||
Scalar color = new Scalar(0);
|
||||
int center = 100;
|
||||
int radius = 5;
|
||||
int offset = 40;
|
||||
|
||||
|
||||
Mat img = new Mat(200, 200, 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);
|
||||
@ -38,10 +37,10 @@ public class StarDetectorTest extends OpenCVTestCase {
|
||||
Mat img = getStarImg();
|
||||
List<KeyPoint> keypoints = new LinkedList<KeyPoint>();
|
||||
StarDetector star = new StarDetector();
|
||||
|
||||
|
||||
star.detect(img, keypoints);
|
||||
|
||||
KeyPoint truth = new KeyPoint(100, 100, 8, -1,-223.40334f, 0, -1);
|
||||
|
||||
KeyPoint truth = new KeyPoint(100, 100, 8, -1, -223.40334f, 0, -1);
|
||||
assertEquals(1, keypoints.size());
|
||||
assertKeyPointEqual(truth, keypoints.get(0), EPS);
|
||||
}
|
||||
|
@ -5,127 +5,126 @@ import org.opencv.highgui.VideoCapture;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
|
||||
public class VideoCaptureTest extends OpenCVTestCase {
|
||||
|
||||
private VideoCapture capture;
|
||||
private boolean isSucceed;
|
||||
private boolean isOpened;
|
||||
|
||||
|
||||
private VideoCapture capture;
|
||||
private boolean isSucceed;
|
||||
private boolean isOpened;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
capture = null;
|
||||
isSucceed = false;
|
||||
isOpened = false;
|
||||
}
|
||||
|
||||
public void test_1() {
|
||||
super.test_1("HIGHGUI.VideoCapture");
|
||||
}
|
||||
|
||||
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 test_1() {
|
||||
super.test_1("HIGHGUI.VideoCapture");
|
||||
}
|
||||
|
||||
public void testGrab() {
|
||||
capture = new VideoCapture();
|
||||
isSucceed = capture.grab();
|
||||
assertFalse(isSucceed);
|
||||
}
|
||||
|
||||
public void testGrabFromRealCamera() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isSucceed = capture.grab();
|
||||
capture.release();
|
||||
assertTrue(isSucceed);
|
||||
}
|
||||
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 testIsOpened() {
|
||||
capture = new VideoCapture();
|
||||
assertFalse(capture.isOpened());
|
||||
}
|
||||
|
||||
public void testIsOpenedRealCamera() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
}
|
||||
public void testGrab() {
|
||||
capture = new VideoCapture();
|
||||
isSucceed = capture.grab();
|
||||
assertFalse(isSucceed);
|
||||
}
|
||||
|
||||
public void testOpen() {
|
||||
capture = new VideoCapture();
|
||||
capture.open(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
}
|
||||
public void testGrabFromRealCamera() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isSucceed = capture.grab();
|
||||
capture.release();
|
||||
assertTrue(isSucceed);
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
public void testIsOpened() {
|
||||
capture = new VideoCapture();
|
||||
assertFalse(capture.isOpened());
|
||||
}
|
||||
|
||||
public void testRelease() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.release();
|
||||
assertFalse(capture.isOpened());
|
||||
}
|
||||
public void testIsOpenedRealCamera() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
public void testOpen() {
|
||||
capture = new VideoCapture();
|
||||
capture.open(Highgui.CV_CAP_ANDROID);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
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());
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
public void testRelease() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
capture.release();
|
||||
assertFalse(capture.isOpened());
|
||||
}
|
||||
|
||||
public void testVideoCapture() {
|
||||
capture = new VideoCapture();
|
||||
assertTrue(null != capture);
|
||||
}
|
||||
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());
|
||||
}
|
||||
|
||||
public void testVideoCaptureInt() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
assertTrue(null != capture);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
}
|
||||
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());
|
||||
}
|
||||
|
||||
public void testVideoCaptureString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
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());
|
||||
}
|
||||
|
||||
public void testVideoCapture() {
|
||||
capture = new VideoCapture();
|
||||
assertTrue(null != capture);
|
||||
}
|
||||
|
||||
public void testVideoCaptureInt() {
|
||||
capture = new VideoCapture(Highgui.CV_CAP_ANDROID);
|
||||
assertTrue(null != capture);
|
||||
isOpened = capture.isOpened();
|
||||
capture.release();
|
||||
assertTrue(isOpened);
|
||||
}
|
||||
|
||||
public void testVideoCaptureString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,23 +4,22 @@ import org.opencv.highgui.Highgui;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.test.OpenCVTestRunner;
|
||||
|
||||
|
||||
public class highguiTest extends OpenCVTestCase {
|
||||
|
||||
public void testImreadString() {
|
||||
dst = Highgui.imread(OpenCVTestRunner.LENA_PATH);
|
||||
assertTrue(!dst.empty());
|
||||
assertEquals(3, dst.channels());
|
||||
assertTrue(512 == dst.cols());
|
||||
assertTrue(512 == dst.rows());
|
||||
}
|
||||
public void testImreadString() {
|
||||
dst = Highgui.imread(OpenCVTestRunner.LENA_PATH);
|
||||
assertTrue(!dst.empty());
|
||||
assertEquals(3, dst.channels());
|
||||
assertTrue(512 == dst.cols());
|
||||
assertTrue(512 == dst.rows());
|
||||
}
|
||||
|
||||
public void testImreadStringInt() {
|
||||
dst = Highgui.imread(OpenCVTestRunner.LENA_PATH, 0);
|
||||
assertTrue(!dst.empty());
|
||||
assertEquals(1, dst.channels());
|
||||
assertTrue(512 == dst.cols());
|
||||
assertTrue(512 == dst.rows());
|
||||
}
|
||||
public void testImreadStringInt() {
|
||||
dst = Highgui.imread(OpenCVTestRunner.LENA_PATH, 0);
|
||||
assertTrue(!dst.empty());
|
||||
assertEquals(1, dst.channels());
|
||||
assertTrue(512 == dst.cols());
|
||||
assertTrue(512 == dst.rows());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,200 +4,200 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class MomentsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_m00() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m00() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m01() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m01() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m10() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m10() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_m30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_m30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_mu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_mu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_mu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_mu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_mu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_mu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_mu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_mu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_mu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_mu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_mu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_mu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_mu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_mu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m00() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m00() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m01() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m01() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m10() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m10() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_m30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_m30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_mu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_mu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_mu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_mu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_mu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_mu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_mu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_mu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_mu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_mu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_mu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_mu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_mu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_mu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu02() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu03() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu11() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu12() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu20() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu21() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu30() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package org.opencv.test.imgproc;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.Converters;
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.core.Mat;
|
||||
@ -17,7 +16,6 @@ import org.opencv.imgproc.Imgproc;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.test.OpenCVTestRunner;
|
||||
|
||||
|
||||
public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
private Mat gray_64f_2;
|
||||
@ -55,7 +53,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testAccumulateMatMatMat() {
|
||||
Imgproc.accumulate(gray_64f_2, dst64F, mask); //TODO: use better mask
|
||||
Imgproc.accumulate(gray_64f_2, dst64F, mask); // TODO: use better mask
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_64F, new Scalar(2));
|
||||
assertMatEqual(truth, dst64F, EPS);
|
||||
}
|
||||
@ -120,8 +118,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testAdaptiveThreshold() {
|
||||
Imgproc.adaptiveThreshold(gray0, dst, 2.0,
|
||||
Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C, Imgproc.THRESH_BINARY, 3, 0);
|
||||
Imgproc.adaptiveThreshold(gray0, dst, 2.0, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C, Imgproc.THRESH_BINARY, 3, 0);
|
||||
assertMatEqual(gray0, dst);
|
||||
}
|
||||
|
||||
@ -151,8 +148,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testBilateralFilterMatMatIntDoubleDoubleInt() {
|
||||
Imgproc.bilateralFilter(gray255, dst, 5, 10.0, 5.0,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.bilateralFilter(gray255, dst, 5, 10.0, 5.0, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
@ -175,8 +171,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testBorderInterpolate() {
|
||||
float val1 = Imgproc.borderInterpolate(100, 150,
|
||||
Imgproc.BORDER_REFLECT_101);
|
||||
float val1 = Imgproc.borderInterpolate(100, 150, Imgproc.BORDER_REFLECT_101);
|
||||
assertEquals(100.0f, val1);
|
||||
|
||||
float val2 = Imgproc.borderInterpolate(-5, 10, Imgproc.BORDER_WRAP);
|
||||
@ -212,8 +207,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testBoxFilterMatMatIntSizePointBooleanInt() {
|
||||
Imgproc.boxFilter(gray255, dst, 8, size, anchorPoint, false,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.boxFilter(gray255, dst, 8, size, anchorPoint, false, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
@ -310,8 +304,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
truth = new Mat(10, 10, CvType.CV_32F, Scalar.all(0.0));
|
||||
truth.put(9, 5, 100.0);
|
||||
Imgproc.calcHist(images, channels, new Mat(), hist, histSize, ranges,
|
||||
true);
|
||||
Imgproc.calcHist(images, channels, new Mat(), hist, histSize, ranges, true);
|
||||
assertMatEqual(truth, hist, EPS);
|
||||
}
|
||||
|
||||
@ -362,37 +355,34 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat map2 = new Mat(1, 4, CvType.CV_32FC1, new Scalar(2.0));
|
||||
Mat dstmap1 = new Mat(1, 4, CvType.CV_16SC2);
|
||||
Mat dstmap2 = new Mat(1, 4, CvType.CV_16UC1);
|
||||
|
||||
|
||||
Imgproc.convertMaps(map1, map2, dstmap1, dstmap2, CvType.CV_16SC2);
|
||||
Mat truthMap1 = new Mat(1, 4, CvType.CV_16SC2);
|
||||
truthMap1.put(0, 0, 1, 2, 1, 2, 1, 2, 1, 2);
|
||||
assertMatEqual(truthMap1, dstmap1);
|
||||
|
||||
Mat truthMap2 = new Mat(1, 4, CvType.CV_16UC1, new Scalar(0));
|
||||
|
||||
Mat truthMap2 = new Mat(1, 4, CvType.CV_16UC1, new Scalar(0));
|
||||
assertMatEqual(truthMap2, dstmap2);
|
||||
}
|
||||
|
||||
public void testConvertMapsMatMatMatMatIntBoolean() {
|
||||
Mat map1 = new Mat(1, 3, CvType.CV_32FC1, new Scalar(2.0));
|
||||
Mat map2 = new Mat(1, 3, CvType.CV_32FC1, new Scalar(4.0));
|
||||
Mat dstmap1 = new Mat(1, 3, CvType.CV_16SC2);
|
||||
Mat dstmap2 = new Mat(1, 3, CvType.CV_16UC1);
|
||||
|
||||
Mat map1 = new Mat(1, 3, CvType.CV_32FC1, new Scalar(2.0));
|
||||
Mat map2 = new Mat(1, 3, CvType.CV_32FC1, new Scalar(4.0));
|
||||
Mat dstmap1 = new Mat(1, 3, CvType.CV_16SC2);
|
||||
Mat dstmap2 = new Mat(1, 3, CvType.CV_16UC1);
|
||||
|
||||
Imgproc.convertMaps(map1, map2, dstmap1, dstmap2, CvType.CV_16SC2, false);
|
||||
Mat truthMap1 = new Mat(1, 3, CvType.CV_16SC2);
|
||||
truthMap1.put(0, 0, 2, 4, 2, 4, 2, 4);
|
||||
assertMatEqual(truthMap1, dstmap1);
|
||||
|
||||
Mat truthMap2 = new Mat(1, 3, CvType.CV_16UC1, new Scalar(0));
|
||||
assertMatEqual(truthMap2, dstmap2);
|
||||
Imgproc.convertMaps(map1, map2, dstmap1, dstmap2, CvType.CV_16SC2, false);
|
||||
Mat truthMap1 = new Mat(1, 3, CvType.CV_16SC2);
|
||||
truthMap1.put(0, 0, 2, 4, 2, 4, 2, 4);
|
||||
assertMatEqual(truthMap1, dstmap1);
|
||||
|
||||
Mat truthMap2 = new Mat(1, 3, CvType.CV_16UC1, new Scalar(0));
|
||||
assertMatEqual(truthMap2, dstmap2);
|
||||
}
|
||||
|
||||
public void testConvexHullMatMat() {
|
||||
Mat points = new Mat(1, 6, CvType.CV_32FC2);
|
||||
points.put(0, 0, 2.0, 0.0, 4.0, 0.0, 3.0, 2.0, 0.0, 2.0, 2.0, 1.0, 3.0,
|
||||
1.0);
|
||||
points.put(0, 0, 2.0, 0.0, 4.0, 0.0, 3.0, 2.0, 0.0, 2.0, 2.0, 1.0, 3.0, 1.0);
|
||||
|
||||
Mat expHull = new Mat(4, 1, CvType.CV_32FC2);
|
||||
expHull.put(0, 0, 4, 0, 3, 2, 0, 2, 2, 0);
|
||||
@ -403,8 +393,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
public void testConvexHullMatMatBoolean() {
|
||||
Mat points = new Mat(1, 6, CvType.CV_32FC2);
|
||||
points.put(0, 0, 2.0, 0.0, 4.0, 0.0, 3.0, 2.0, 0.0, 2.0, 2.0, 1.0, 3.0,
|
||||
1.0);
|
||||
points.put(0, 0, 2.0, 0.0, 4.0, 0.0, 3.0, 2.0, 0.0, 2.0, 2.0, 1.0, 3.0, 1.0);
|
||||
|
||||
Mat expHull = new Mat(4, 1, CvType.CV_32FC2);
|
||||
expHull.put(0, 0, 0, 2, 3, 2, 4, 0, 2, 0);
|
||||
@ -415,8 +404,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
public void testConvexHullMatMatBooleanBoolean() {
|
||||
Mat points = new Mat(1, 6, CvType.CV_32FC2);
|
||||
points.put(0, 0, 2.0, 0.0, 4.0, 0.0, 3.0, 2.0, 0.0, 2.0, 2.0, 1.0, 3.0,
|
||||
1.0);
|
||||
points.put(0, 0, 2.0, 0.0, 4.0, 0.0, 3.0, 2.0, 0.0, 2.0, 2.0, 1.0, 3.0, 1.0);
|
||||
|
||||
Mat expHull = new Mat(4, 1, CvType.CV_32FC2);
|
||||
expHull.put(0, 0, 0, 2, 3, 2, 4, 0, 2, 0);
|
||||
@ -430,8 +418,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth = new Mat(6, 6, CvType.CV_32F, new Scalar(1));
|
||||
int border = 2;
|
||||
|
||||
Imgproc.copyMakeBorder(src, dst, border, border, border, border,
|
||||
Imgproc.BORDER_REPLICATE);
|
||||
Imgproc.copyMakeBorder(src, dst, border, border, border, border, Imgproc.BORDER_REPLICATE);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -442,8 +429,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Scalar value = new Scalar(0);
|
||||
int border = 2;
|
||||
|
||||
Imgproc.copyMakeBorder(src, dst, border, border, border, border,
|
||||
Imgproc.BORDER_REPLICATE, value);
|
||||
Imgproc.copyMakeBorder(src, dst, border, border, border, border, Imgproc.BORDER_REPLICATE, value);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -469,8 +455,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
truth = new Mat(4, 4, CvType.CV_32FC(6), new Scalar(0));
|
||||
|
||||
Imgproc.cornerEigenValsAndVecs(src, dst, blockSize, ksize,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.cornerEigenValsAndVecs(src, dst, blockSize, ksize, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -488,8 +473,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
int blockSize = 5;
|
||||
int ksize = 7;
|
||||
double k = 0.1;
|
||||
Imgproc.cornerHarris(gray255, dst, blockSize, ksize, k,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.cornerHarris(gray255, dst, blockSize, ksize, k, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -594,8 +578,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
public void testDilateMatMatMatPointIntInt() {
|
||||
Mat kernel = new Mat();
|
||||
|
||||
Imgproc.dilate(gray255, dst, kernel, anchorPoint, 10,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.dilate(gray255, dst, kernel, anchorPoint, 10, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(gray255, dst);
|
||||
}
|
||||
|
||||
@ -603,15 +586,13 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat kernel = new Mat();
|
||||
Scalar value = new Scalar(0);
|
||||
|
||||
Imgproc.dilate(gray255, dst, kernel, anchorPoint, 10,
|
||||
Imgproc.BORDER_REFLECT, value);
|
||||
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 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);
|
||||
@ -624,11 +605,11 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat hierarchy = dst;
|
||||
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));
|
||||
assertTrue(1 == contours.size());
|
||||
|
||||
assertFalse(0 == Core.countNonZero(gray0));
|
||||
Imgproc.drawContours(gray0, contours, -1, new Scalar(0));
|
||||
assertTrue(0 == Core.countNonZero(gray0));
|
||||
}
|
||||
|
||||
public void testDrawContoursMatListOfMatIntScalarInt() {
|
||||
@ -714,15 +695,13 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat kernel = new Mat();
|
||||
Scalar sc = new Scalar(3, 3);
|
||||
|
||||
Imgproc.erode(src, dst, kernel, anchorPoint, 10,
|
||||
Imgproc.BORDER_REFLECT, sc);
|
||||
Imgproc.erode(src, dst, kernel, anchorPoint, 10, Imgproc.BORDER_REFLECT, sc);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testFilter2DMatMatIntMat() {
|
||||
Mat src = Mat.eye(4, 4, CvType.CV_32F);
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(
|
||||
1.0));
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(1.0));
|
||||
|
||||
truth = Mat.eye(4, 4, CvType.CV_32F);
|
||||
truth.put(0, 0, 2, 2, 1, 0);
|
||||
@ -735,8 +714,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testFilter2DMatMatIntMatPoint() {
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(
|
||||
1.0));
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(1.0));
|
||||
Point point = new Point(0, 0);
|
||||
|
||||
Imgproc.filter2D(gray128, dst, -1, kernel, point);
|
||||
@ -744,12 +722,10 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testFilter2DMatMatIntMatPointDoubleInt() {
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(
|
||||
0.0));
|
||||
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);
|
||||
Imgproc.filter2D(gray128, dst, -1, kernel, point, 2.0, Imgproc.BORDER_CONSTANT);
|
||||
assertMatEqual(gray2, dst);
|
||||
}
|
||||
|
||||
@ -757,15 +733,15 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat img = new Mat(50, 50, CvType.CV_8UC1, new Scalar(0));
|
||||
List<Mat> contours = new ArrayList<Mat>(5);
|
||||
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());
|
||||
|
||||
Core.rectangle(img, new Point(10, 20), new Point(20, 30), new Scalar(100), 3, 16 /*CV_AA*/);
|
||||
Core.rectangle(img, new Point(10, 20), new Point(20, 30), new Scalar(100), 3, 16 /* CV_AA */);
|
||||
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);
|
||||
@ -773,16 +749,16 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testFindContoursMatListOfMatMatIntIntPoint() {
|
||||
Mat img = new Mat(50, 50, CvType.CV_8UC1, new Scalar(0));
|
||||
Mat img2 = img.submat(5, 50, 3, 50);
|
||||
List<Mat> contours = new ArrayList<Mat>();
|
||||
Mat img = new Mat(50, 50, CvType.CV_8UC1, new Scalar(0));
|
||||
Mat img2 = img.submat(5, 50, 3, 50);
|
||||
List<Mat> contours = new ArrayList<Mat>();
|
||||
List<Mat> contours2 = new ArrayList<Mat>();
|
||||
Mat hierarchy = dst;
|
||||
|
||||
Core.rectangle(img, new Point(10, 20), new Point(20, 30), new Scalar(100), 3, 16 /*CV_AA*/);
|
||||
Core.rectangle(img, new Point(10, 20), new Point(20, 30), new Scalar(100), 3, 16 /* CV_AA */);
|
||||
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);
|
||||
|
||||
Imgproc.findContours(img, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
|
||||
Imgproc.findContours(img2, contours2, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE, new Point(3, 5));
|
||||
|
||||
assertEquals(contours.size(), contours2.size());
|
||||
@ -790,7 +766,8 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testFitEllipse() {
|
||||
Mat points = new Mat(1, 5, CvType.CV_32FC2); //TODO: use the list of Points
|
||||
Mat points = new Mat(1, 5, CvType.CV_32FC2); // TODO: use the list of
|
||||
// Points
|
||||
points.put(0, 0, 0.0, 0.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0);
|
||||
|
||||
RotatedRect rrect = new RotatedRect();
|
||||
@ -815,33 +792,33 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
public void testFloodFillMatMatPointScalar() {
|
||||
Mat mask = new Mat(matSize + 2, matSize + 2, CvType.CV_8U);
|
||||
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);
|
||||
|
||||
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()"
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
@ -1025,63 +1002,62 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(1, 0, 0, 0, 1);
|
||||
truth.put(2, 0, 1, 1, 1);
|
||||
|
||||
dst = Imgproc.getStructuringElement(Imgproc.MORPH_CROSS, size,
|
||||
anchorPoint);
|
||||
dst = Imgproc.getStructuringElement(Imgproc.MORPH_CROSS, size, anchorPoint);
|
||||
assertMatEqual(truth, dst);
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDouble() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
|
||||
Imgproc.goodFeaturesToTrack(src, lp, 100, 0.01, 3);
|
||||
|
||||
|
||||
assertEquals(4, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMat() {
|
||||
Mat src = gray128;
|
||||
Point tl = new Point(2, 2);
|
||||
Point br = new Point(8, 8);
|
||||
Scalar color = new Scalar(100);
|
||||
Core.rectangle(src, tl, br, color, -1);
|
||||
Mat mask = gray0;
|
||||
Core.circle(mask, tl, 3, color, -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
Mat src = gray128;
|
||||
Point tl = new Point(2, 2);
|
||||
Point br = new Point(8, 8);
|
||||
Scalar color = new Scalar(100);
|
||||
Core.rectangle(src, tl, br, color, -1);
|
||||
Mat mask = gray0;
|
||||
Core.circle(mask, tl, 3, color, -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
|
||||
Imgproc.goodFeaturesToTrack(src, lp, 100, 0.01, 3, mask);
|
||||
|
||||
|
||||
assertEquals(1, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMatInt() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
|
||||
Imgproc.goodFeaturesToTrack(src, lp, 100, 0.01, 3, gray1, 4);
|
||||
|
||||
|
||||
assertEquals(4, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMatIntBoolean() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
|
||||
Imgproc.goodFeaturesToTrack(src, lp, 100, 0.01, 3, gray1, 4, true);
|
||||
|
||||
|
||||
assertEquals(4, lp.size());
|
||||
}
|
||||
|
||||
public void testGoodFeaturesToTrackMatMatIntDoubleDoubleMatIntBooleanDouble() {
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
Mat src = gray0;
|
||||
Core.rectangle(src, new Point(2, 2), new Point(8, 8), new Scalar(100), -1);
|
||||
List<Point> lp = new ArrayList<Point>();
|
||||
|
||||
Imgproc.goodFeaturesToTrack(src, lp, 100, 0.01, 3, gray1, 4, true, 0);
|
||||
|
||||
|
||||
assertEquals(4, lp.size());
|
||||
}
|
||||
|
||||
@ -1094,20 +1070,20 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testHoughCirclesMatMatIntDoubleDouble() {
|
||||
int sz = 512;
|
||||
Mat img = new Mat(sz, sz, CvType.CV_8U, new Scalar(128));
|
||||
|
||||
Mat circles = new Mat();
|
||||
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.CV_HOUGH_GRADIENT, 2.0, img.rows()/4);
|
||||
assertEquals(0, circles.cols());
|
||||
|
||||
Point center = new Point(img.cols()/2, img.rows()/2);
|
||||
int radius = Math.min(img.cols()/4, img.rows()/4);
|
||||
Core.circle(img, center, radius, colorBlack, 3);
|
||||
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.CV_HOUGH_GRADIENT, 2.0, img.rows()/4);
|
||||
assertEquals(1, circles.cols());
|
||||
int sz = 512;
|
||||
Mat img = new Mat(sz, sz, CvType.CV_8U, new Scalar(128));
|
||||
|
||||
Mat circles = new Mat();
|
||||
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.CV_HOUGH_GRADIENT, 2.0, img.rows() / 4);
|
||||
assertEquals(0, circles.cols());
|
||||
|
||||
Point center = new Point(img.cols() / 2, img.rows() / 2);
|
||||
int radius = Math.min(img.cols() / 4, img.rows() / 4);
|
||||
Core.circle(img, center, radius, colorBlack, 3);
|
||||
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.CV_HOUGH_GRADIENT, 2.0, img.rows() / 4);
|
||||
assertEquals(1, circles.cols());
|
||||
}
|
||||
|
||||
public void testHoughCirclesMatMatIntDoubleDoubleDouble() {
|
||||
@ -1167,9 +1143,8 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat map1 = new Mat();
|
||||
Mat map2 = new Mat();
|
||||
|
||||
//TODO: complete this test
|
||||
Imgproc.initUndistortRectifyMap(cameraMatrix, distCoeffs,
|
||||
R, newCameraMatrix, size, CvType.CV_32F, map1, map2);
|
||||
// TODO: complete this test
|
||||
Imgproc.initUndistortRectifyMap(cameraMatrix, distCoeffs, R, newCameraMatrix, size, CvType.CV_32F, map1, map2);
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
@ -1381,8 +1356,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat src = new Mat(3, 3, CvType.CV_32F, new Scalar(2.0));
|
||||
truth = new Mat(3, 3, CvType.CV_32F, new Scalar(0.00099945068));
|
||||
|
||||
Imgproc.Laplacian(src, dst, CvType.CV_32F, 1, 2.0, EPS,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.Laplacian(src, dst, CvType.CV_32F, 1, 2.0, EPS, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1435,18 +1409,18 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
public void testMinEnclosingCircle() {
|
||||
Mat points = new Mat(1, 4, CvType.CV_32FC2);
|
||||
points.put(0, 0, -1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, -1.0);
|
||||
|
||||
|
||||
OpenCVTestRunner.Log(points.toString());
|
||||
OpenCVTestRunner.Log(points.dump());
|
||||
|
||||
|
||||
Point actualCenter = new Point();
|
||||
float radius = 347.0f; //FIXME: Unexpected radius is returned i.e 0
|
||||
float radius = 347.0f; // FIXME: Unexpected radius is returned i.e 0
|
||||
Imgproc.minEnclosingCircle(points, actualCenter, radius);
|
||||
|
||||
Point truthCenter = new Point(0, 0);
|
||||
|
||||
Point truthCenter = new Point(0, 0);
|
||||
assertEquals(truthCenter, actualCenter);
|
||||
|
||||
float truthRadius = 1.0f;
|
||||
|
||||
float truthRadius = 1.0f;
|
||||
OpenCVTestRunner.Log("" + radius);
|
||||
assertEquals(truthRadius, radius, weakEPS);
|
||||
}
|
||||
@ -1495,8 +1469,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Mat kernel = new Mat(imgprocSz, imgprocSz, CvType.CV_8U, new Scalar(1));
|
||||
Point point = new Point(1, 1);
|
||||
|
||||
Imgproc.morphologyEx(src, dst, Imgproc.MORPH_TOPHAT, kernel, point, 10,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.morphologyEx(src, dst, Imgproc.MORPH_TOPHAT, kernel, point, 10, Imgproc.BORDER_REFLECT);
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_8U);
|
||||
truth.put(0, 0, 1, 0);
|
||||
truth.put(1, 0, 1, 0);
|
||||
@ -1512,8 +1485,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
Point point = new Point(1, 1);
|
||||
Scalar sc = new Scalar(3, 3);
|
||||
|
||||
Imgproc.morphologyEx(src, dst, Imgproc.MORPH_TOPHAT, kernel, point, 10,
|
||||
Imgproc.BORDER_REFLECT, sc);
|
||||
Imgproc.morphologyEx(src, dst, Imgproc.MORPH_TOPHAT, kernel, point, 10, Imgproc.BORDER_REFLECT, sc);
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_8U);
|
||||
truth.put(0, 0, 1, 0);
|
||||
truth.put(1, 0, 1, 0);
|
||||
@ -1657,8 +1629,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
truth = new Mat(1, 3, CvType.CV_32F, new Scalar(2));
|
||||
|
||||
Imgproc.remap(src, dst, map1, map2, Imgproc.INTER_LINEAR,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.remap(src, dst, map1, map2, Imgproc.INTER_LINEAR, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1674,8 +1645,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
|
||||
truth = new Mat(1, 3, CvType.CV_32F, new Scalar(2));
|
||||
|
||||
Imgproc.remap(src, dst, map1, map2, Imgproc.INTER_LINEAR,
|
||||
Imgproc.BORDER_REFLECT, sc);
|
||||
Imgproc.remap(src, dst, map1, map2, Imgproc.INTER_LINEAR, Imgproc.BORDER_REFLECT, sc);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1744,8 +1714,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(1, 0, 10.5, 0, -10.5);
|
||||
truth.put(2, 0, 4.5, 19.5, 15);
|
||||
|
||||
Imgproc.Scharr(src, dst, CvType.CV_32F, 1, 0, 1.5, 0.0,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.Scharr(src, dst, CvType.CV_32F, 1, 0, 1.5, 0.0, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1763,8 +1732,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testSepFilter2DMatMatIntMatMatPoint() {
|
||||
Mat src = new Mat(imgprocSz, imgprocSz, CvType.CV_32FC1,
|
||||
new Scalar(2.0));
|
||||
Mat src = new Mat(imgprocSz, imgprocSz, CvType.CV_32FC1, new Scalar(2.0));
|
||||
Mat kernelX = new Mat(1, 3, CvType.CV_32FC1);
|
||||
Mat kernelY = new Mat(1, 3, CvType.CV_32FC1);
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(36.0));
|
||||
@ -1772,14 +1740,12 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
kernelX.put(0, 0, 2.0, 2.0, 2.0);
|
||||
kernelY.put(0, 0, 1.0, 1.0, 1.0);
|
||||
|
||||
Imgproc.sepFilter2D(src, dst, CvType.CV_32F, kernelX, kernelY,
|
||||
anchorPoint);
|
||||
Imgproc.sepFilter2D(src, dst, CvType.CV_32F, kernelX, kernelY, anchorPoint);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
public void testSepFilter2DMatMatIntMatMatPointDouble() {
|
||||
Mat src = new Mat(imgprocSz, imgprocSz, CvType.CV_32FC1,
|
||||
new Scalar(2.0));
|
||||
Mat src = new Mat(imgprocSz, imgprocSz, CvType.CV_32FC1, new Scalar(2.0));
|
||||
|
||||
Mat kernelX = new Mat(1, 3, CvType.CV_32FC1);
|
||||
kernelX.put(0, 0, 2.0, 2.0, 2.0);
|
||||
@ -1788,8 +1754,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
kernelY.put(0, 0, 1.0, 1.0, 1.0);
|
||||
|
||||
truth = new Mat(imgprocSz, imgprocSz, CvType.CV_32F, new Scalar(36.001));
|
||||
Imgproc.sepFilter2D(src, dst, CvType.CV_32F, kernelX, kernelY,
|
||||
anchorPoint, EPS);
|
||||
Imgproc.sepFilter2D(src, dst, CvType.CV_32F, kernelX, kernelY, anchorPoint, EPS);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1801,8 +1766,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
kernelY.put(0, 0, 1.0, 1.0, 1.0);
|
||||
|
||||
truth = new Mat(10, 10, CvType.CV_32F, new Scalar(0.001));
|
||||
Imgproc.sepFilter2D(gray0, dst, CvType.CV_32F, kernelX, kernelY,
|
||||
anchorPoint, EPS, Imgproc.BORDER_REFLECT);
|
||||
Imgproc.sepFilter2D(gray0, dst, CvType.CV_32F, kernelX, kernelY, anchorPoint, EPS, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1847,8 +1811,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(1, 0, -14, -12, 2);
|
||||
truth.put(2, 0, -10, 0, 10);
|
||||
|
||||
Imgproc.Sobel(src, dst, CvType.CV_32F, 1, 0, 3, 2.0, 0.0,
|
||||
Imgproc.BORDER_REPLICATE);
|
||||
Imgproc.Sobel(src, dst, CvType.CV_32F, 1, 0, 3, 2.0, 0.0, Imgproc.BORDER_REPLICATE);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1958,8 +1921,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(0, 0, 2, 4);
|
||||
truth.put(1, 0, 6, 4);
|
||||
|
||||
Imgproc.warpAffine(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP,
|
||||
Imgproc.BORDER_TRANSPARENT);
|
||||
Imgproc.warpAffine(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP, Imgproc.BORDER_TRANSPARENT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -1980,8 +1942,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(0, 0, 6, 4);
|
||||
truth.put(1, 0, 6, 4);
|
||||
|
||||
Imgproc.warpAffine(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP,
|
||||
Imgproc.BORDER_CONSTANT, sc);
|
||||
Imgproc.warpAffine(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP, Imgproc.BORDER_CONSTANT, sc);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -2042,8 +2003,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(0, 0, 6, 4);
|
||||
truth.put(1, 0, 6, 4);
|
||||
|
||||
Imgproc.warpPerspective(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP,
|
||||
Imgproc.BORDER_REFLECT);
|
||||
Imgproc.warpPerspective(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP, Imgproc.BORDER_REFLECT);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
@ -2061,8 +2021,7 @@ public class imgprocTest extends OpenCVTestCase {
|
||||
truth.put(0, 0, 2, 4);
|
||||
truth.put(1, 0, 6, 4);
|
||||
|
||||
Imgproc.warpPerspective(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP,
|
||||
Imgproc.BORDER_REFLECT, sc);
|
||||
Imgproc.warpPerspective(src, dst, M, dsize, Imgproc.WARP_INVERSE_MAP, Imgproc.BORDER_REFLECT, sc);
|
||||
assertMatEqual(truth, dst, EPS);
|
||||
}
|
||||
|
||||
|
@ -4,68 +4,68 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvANN_MLPTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCreateMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCreateMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCreateMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCreateMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCreateMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLP() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvANN_MLP() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvANN_MLPMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvANN_MLPMatInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvANN_MLPMatIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvANN_MLPMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvANN_MLPMatIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredict() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatMatCvANN_MLP_TrainParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,72 +4,72 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvANN_MLP_TrainParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_bp_dw_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_bp_dw_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_bp_moment_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_max() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_min() {
|
||||
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_minus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_rp_dw_plus() {
|
||||
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_rp_dw0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_train_method() {
|
||||
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_dw_scale() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_bp_moment_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_max() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_min() {
|
||||
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_minus() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_rp_dw_plus() {
|
||||
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_rp_dw0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_train_method() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_train_method() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,40 +4,40 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvBoostParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_boost_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_boost_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_split_criteria() {
|
||||
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_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weight_trim_rate() {
|
||||
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_boost_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_split_criteria() {
|
||||
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_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weight_trim_rate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_weight_trim_rate() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,92 +4,92 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvBoostTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoost() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvBoost() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvBoostMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvBoostMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvBoostMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvBoostMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvBoostMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvBoostMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvBoostMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMatRangeBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeBooleanBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMatRangeBooleanBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPrune() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPrune() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMatCvBoostParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,72 +4,72 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvDTreeParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_cv_folds() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_cv_folds() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_max_categories() {
|
||||
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_max_depth() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_min_sample_count() {
|
||||
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_regression_accuracy() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_truncate_pruned_tree() {
|
||||
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_1se_rule() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_use_surrogates() {
|
||||
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_cv_folds() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_categories() {
|
||||
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_max_depth() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_min_sample_count() {
|
||||
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_regression_accuracy() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_truncate_pruned_tree() {
|
||||
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_1se_rule() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_use_surrogates() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_use_surrogates() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,44 +4,44 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvDTreeTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvDTree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvDTree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvDTreeParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMatCvDTreeParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,32 +4,32 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvEMParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_cov_mat_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_cov_mat_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_start_step() {
|
||||
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_cov_mat_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nclusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_start_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_start_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,84 +4,84 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvEMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCalcLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvEM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvEMMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvEMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvEMMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvEMMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetCovs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetCovs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetLikelihood() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetLikelihoodDelta() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetLikelihoodDelta() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetMeans() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetMeans() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetNClusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetNClusters() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetProbs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetProbs() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetWeights() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetWeights() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatCvEMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatCvEMParamsMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatCvEMParamsMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,36 +4,36 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvERTreesTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCvERTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvERTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,40 +4,40 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvGBTreesParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_loss_function_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_loss_function_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_weak_count() {
|
||||
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_loss_function_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_shrinkage() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_subsample_portion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_weak_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,84 +4,84 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvGBTreesTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvGBTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvGBTreesMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvGBTreesMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvGBTreesMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvGBTreesMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvGBTreesMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvGBTreesMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvGBTreesMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMatRange() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMatRangeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMatRangeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMatCvGBTreesParamsBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,52 +4,52 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvKNearestTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCvKNearest() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvKNearest() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvKNearestMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvKNearestMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvKNearestMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvKNearestMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvKNearestMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testFind_nearest() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testFind_nearest() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatBooleanInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatBooleanIntBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatBooleanIntBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,52 +4,52 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvNormalBayesClassifierTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifier() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvNormalBayesClassifier() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvNormalBayesClassifierMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvNormalBayesClassifierMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvNormalBayesClassifierMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvNormalBayesClassifierMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,32 +4,32 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvParamGridTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_max_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_max_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_min_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_min_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_max_val() {
|
||||
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_min_val() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_step() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,24 +4,24 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvRTParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_calc_var_importance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_calc_var_importance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nactive_vars() {
|
||||
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_calc_var_importance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nactive_vars() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nactive_vars() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,60 +4,60 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvRTreesTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvRTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvRTrees() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGetVarImportance() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict_probMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredict_probMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredict_probMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredict_probMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatIntMatMatMatMatMatCvRTParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,72 +4,72 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvSVMParamsTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testGet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testGet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_C() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_coef0() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_degree() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_gamma() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_kernel_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_nu() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_p() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSet_svm_type() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,100 +4,100 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvSVMTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testClear() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvSVM() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvSVMMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvSVMMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvSVMMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCvSVMMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCvSVMMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGet_support_vector_count() {
|
||||
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 testGet_var_count() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testPredictMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testPredictMatBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGrid() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrain_autoMatMatMatMatCvSVMParamsIntCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridCvParamGridBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testTrainMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testTrainMatMatMatMatCvSVMParams() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,24 +4,24 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class CvStatModelTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testLoadString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testLoadString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testLoadStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testLoadStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSaveString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSaveString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSaveStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testSaveStringString() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,95 +11,98 @@ import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.test.OpenCVTestRunner;
|
||||
|
||||
public class CascadeClassifierTest extends OpenCVTestCase {
|
||||
|
||||
private CascadeClassifier cc;
|
||||
|
||||
|
||||
private CascadeClassifier cc;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
||||
cc = null;
|
||||
}
|
||||
|
||||
public void testCascadeClassifier() {
|
||||
cc = new CascadeClassifier();
|
||||
assertTrue(null != cc);
|
||||
}
|
||||
public void testCascadeClassifier() {
|
||||
cc = new CascadeClassifier();
|
||||
assertTrue(null != cc);
|
||||
}
|
||||
|
||||
public void testCascadeClassifierString() {
|
||||
cc = new CascadeClassifier(OpenCVTestRunner.LBPCASCADE_FRONTALFACE_PATH);
|
||||
assertTrue(null != cc);
|
||||
}
|
||||
public void testCascadeClassifierString() {
|
||||
cc = new CascadeClassifier(OpenCVTestRunner.LBPCASCADE_FRONTALFACE_PATH);
|
||||
assertTrue(null != cc);
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRect() {
|
||||
CascadeClassifier cc = new CascadeClassifier(OpenCVTestRunner.LBPCASCADE_FRONTALFACE_PATH);
|
||||
ArrayList<Rect> faces = new ArrayList<Rect>();
|
||||
|
||||
Mat greyLena = new Mat();
|
||||
Imgproc.cvtColor(rgbLena, greyLena, Imgproc.COLOR_RGB2GRAY);
|
||||
|
||||
//TODO: doesn't detect with 1.1 scale
|
||||
cc.detectMultiScale(greyLena, faces, 1.09, 2, 2 /*TODO: CV_HAAR_SCALE_IMAGE*/, new Size(30, 30));
|
||||
assertEquals(1, faces.size());
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRect() {
|
||||
CascadeClassifier cc = new CascadeClassifier(OpenCVTestRunner.LBPCASCADE_FRONTALFACE_PATH);
|
||||
ArrayList<Rect> faces = new ArrayList<Rect>();
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
Mat greyLena = new Mat();
|
||||
Imgproc.cvtColor(rgbLena, greyLena, Imgproc.COLOR_RGB2GRAY);
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
// TODO: doesn't detect with 1.1 scale
|
||||
cc.detectMultiScale(greyLena, faces, 1.09, 2, 2 /*
|
||||
* TODO:
|
||||
* CV_HAAR_SCALE_IMAGE
|
||||
*/, new Size(30, 30));
|
||||
assertEquals(1, faces.size());
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectDoubleIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectDoubleIntIntSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectDoubleIntIntSizeSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectDoubleIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectDoubleIntIntSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectDoubleIntIntSizeSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntIntSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntIntSizeSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntIntSizeSizeBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntIntSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
cc = new CascadeClassifier();
|
||||
assertTrue(cc.empty());
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntIntSizeSize() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testLoad() {
|
||||
cc = new CascadeClassifier();
|
||||
cc.load(OpenCVTestRunner.LBPCASCADE_FRONTALFACE_PATH);
|
||||
assertTrue(!cc.empty());
|
||||
}
|
||||
public void testDetectMultiScaleMatListOfRectListOfIntegerListOfDoubleDoubleIntIntSizeSizeBoolean() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEmpty() {
|
||||
cc = new CascadeClassifier();
|
||||
assertTrue(cc.empty());
|
||||
}
|
||||
|
||||
public void testLoad() {
|
||||
cc = new CascadeClassifier();
|
||||
cc.load(OpenCVTestRunner.LBPCASCADE_FRONTALFACE_PATH);
|
||||
assertTrue(!cc.empty());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,43 +6,42 @@ import org.opencv.core.Rect;
|
||||
import org.opencv.objdetect.Objdetect;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
|
||||
public class objdetectTest extends OpenCVTestCase {
|
||||
|
||||
public void testGroupRectanglesListOfRectInt() {
|
||||
Rect r = new Rect(10, 10, 20, 20);
|
||||
ArrayList<Rect> rects = new ArrayList<Rect>();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
rects.add(r);
|
||||
|
||||
int groupThreshold = 1;
|
||||
Objdetect.groupRectangles(rects, groupThreshold);
|
||||
assertEquals(1, rects.size());
|
||||
}
|
||||
|
||||
public void testGroupRectanglesListOfRectIntDouble() {
|
||||
Rect r1 = new Rect(10, 10, 20, 20);
|
||||
Rect r2 = new Rect(10, 10, 25, 25);
|
||||
ArrayList<Rect> rects = new ArrayList<Rect>();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
rects.add(r1);
|
||||
for (int i = 0; i < 10; i++)
|
||||
rects.add(r2);
|
||||
|
||||
int groupThreshold = 1;
|
||||
double eps = 0.2;
|
||||
Objdetect.groupRectangles(rects, groupThreshold, eps);
|
||||
assertEquals(2, rects.size());
|
||||
}
|
||||
public void testGroupRectanglesListOfRectInt() {
|
||||
Rect r = new Rect(10, 10, 20, 20);
|
||||
ArrayList<Rect> rects = new ArrayList<Rect>();
|
||||
|
||||
public void testGroupRectanglesListOfRectListOfIntegerInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
for (int i = 0; i < 10; i++)
|
||||
rects.add(r);
|
||||
|
||||
public void testGroupRectanglesListOfRectListOfIntegerIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
int groupThreshold = 1;
|
||||
Objdetect.groupRectangles(rects, groupThreshold);
|
||||
assertEquals(1, rects.size());
|
||||
}
|
||||
|
||||
public void testGroupRectanglesListOfRectIntDouble() {
|
||||
Rect r1 = new Rect(10, 10, 20, 20);
|
||||
Rect r2 = new Rect(10, 10, 25, 25);
|
||||
ArrayList<Rect> rects = new ArrayList<Rect>();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
rects.add(r1);
|
||||
for (int i = 0; i < 10; i++)
|
||||
rects.add(r2);
|
||||
|
||||
int groupThreshold = 1;
|
||||
double eps = 0.2;
|
||||
Objdetect.groupRectangles(rects, groupThreshold, eps);
|
||||
assertEquals(2, rects.size());
|
||||
}
|
||||
|
||||
public void testGroupRectanglesListOfRectListOfIntegerInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testGroupRectanglesListOfRectListOfIntegerIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,20 +4,20 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class BackgroundSubtractorMOGTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testBackgroundSubtractorMOG() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testBackgroundSubtractorMOG() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testBackgroundSubtractorMOGIntIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testBackgroundSubtractorMOGIntIntDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testBackgroundSubtractorMOGIntIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testBackgroundSubtractorMOGIntIntDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,16 +4,16 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class BackgroundSubtractorTest extends OpenCVTestCase {
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testApplyMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testApplyMatMat() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testApplyMatMatDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testApplyMatMatDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,105 +7,104 @@ import org.opencv.core.Core;
|
||||
import org.opencv.video.Video;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
|
||||
public class videoTest extends OpenCVTestCase {
|
||||
|
||||
private int shift1;
|
||||
private int shift2;
|
||||
private int w;
|
||||
private int h;
|
||||
|
||||
private Mat subLena1 = null;
|
||||
private Mat subLena2 = null;
|
||||
|
||||
private Mat nextPts = null;
|
||||
private Mat status = null;
|
||||
private Mat err = null;
|
||||
|
||||
private int shift1;
|
||||
private int shift2;
|
||||
private int w;
|
||||
private int h;
|
||||
|
||||
private Mat subLena1 = null;
|
||||
private Mat subLena2 = null;
|
||||
|
||||
private Mat nextPts = null;
|
||||
private Mat status = null;
|
||||
private Mat err = null;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
shift1 = 10;
|
||||
shift2 = 17;
|
||||
w = rgbLena.cols() / 2;
|
||||
h = rgbLena.rows() / 2;
|
||||
|
||||
subLena1 = rgbLena.submat(shift1, h + shift1, shift1, w + shift1);
|
||||
subLena2 = rgbLena.submat(shift2, h + shift2, shift2, w + shift2);
|
||||
|
||||
nextPts = new Mat();
|
||||
status = new Mat();
|
||||
err = new Mat();
|
||||
|
||||
shift1 = 10;
|
||||
shift2 = 17;
|
||||
w = rgbLena.cols() / 2;
|
||||
h = rgbLena.rows() / 2;
|
||||
|
||||
subLena1 = rgbLena.submat(shift1, h + shift1, shift1, w + shift1);
|
||||
subLena2 = rgbLena.submat(shift2, h + shift2, shift2, w + shift2);
|
||||
|
||||
nextPts = new Mat();
|
||||
status = new Mat();
|
||||
err = new Mat();
|
||||
}
|
||||
|
||||
public void testCalcGlobalOrientation() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcGlobalOrientation() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcMotionGradientMatMatMatDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcMotionGradientMatMatMatDoubleDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcMotionGradientMatMatMatDoubleDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcMotionGradientMatMatMatDoubleDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowFarneback() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcOpticalFlowFarneback() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMat() {
|
||||
Mat prevPts = new Mat(1, 3, CvType.CV_32FC2);
|
||||
prevPts.put(0, 0, 1.0, 1.0, 5.0, 5.0, 10.0, 10.0);
|
||||
|
||||
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err);
|
||||
assertEquals(3, Core.countNonZero(status));
|
||||
}
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMat() {
|
||||
Mat prevPts = new Mat(1, 3, CvType.CV_32FC2);
|
||||
prevPts.put(0, 0, 1.0, 1.0, 5.0, 5.0, 10.0, 10.0);
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSize() {
|
||||
Mat prevPts = new Mat(1, 3, CvType.CV_32FC2);
|
||||
prevPts.put(0, 0, 1.0, 1.0, 5.0, 5.0, 10.0, 10.0);
|
||||
|
||||
Size sz = new Size(5, 5);
|
||||
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err, sz);
|
||||
assertEquals(0, Core.countNonZero(status));
|
||||
}
|
||||
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err);
|
||||
assertEquals(3, Core.countNonZero(status));
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSize() {
|
||||
Mat prevPts = new Mat(1, 3, CvType.CV_32FC2);
|
||||
prevPts.put(0, 0, 1.0, 1.0, 5.0, 5.0, 10.0, 10.0);
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeIntTermCriteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
Size sz = new Size(5, 5);
|
||||
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err, sz);
|
||||
assertEquals(0, Core.countNonZero(status));
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeIntTermCriteriaDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeIntTermCriteriaDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeIntTermCriteria() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testCamShift() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeIntTermCriteriaDouble() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testEstimateRigidTransform() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeIntTermCriteriaDoubleInt() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testMeanShift() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testCamShift() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSegmentMotion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testEstimateRigidTransform() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testUpdateMotionHistory() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
public void testMeanShift() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testSegmentMotion() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
public void testUpdateMotionHistory() {
|
||||
fail("Not yet implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user