mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.7 KiB
100 lines
2.7 KiB
14 years ago
|
package org.opencv.test.video;
|
||
|
|
||
13 years ago
|
import org.opencv.core.Core;
|
||
14 years ago
|
import org.opencv.core.Mat;
|
||
13 years ago
|
import org.opencv.core.MatOfByte;
|
||
|
import org.opencv.core.MatOfFloat;
|
||
|
import org.opencv.core.MatOfPoint2f;
|
||
13 years ago
|
import org.opencv.core.Point;
|
||
14 years ago
|
import org.opencv.core.Size;
|
||
14 years ago
|
import org.opencv.test.OpenCVTestCase;
|
||
13 years ago
|
import org.opencv.video.Video;
|
||
14 years ago
|
|
||
13 years ago
|
public class VideoTest extends OpenCVTestCase {
|
||
|
|
||
13 years ago
|
private MatOfFloat err = null;
|
||
13 years ago
|
private int h;
|
||
13 years ago
|
private MatOfPoint2f nextPts = null;
|
||
|
private MatOfPoint2f prevPts = null;
|
||
13 years ago
|
|
||
|
private int shift1;
|
||
|
private int shift2;
|
||
|
|
||
13 years ago
|
private MatOfByte status = null;
|
||
13 years ago
|
private Mat subLena1 = null;
|
||
|
private Mat subLena2 = null;
|
||
13 years ago
|
private int w;
|
||
13 years ago
|
|
||
14 years ago
|
@Override
|
||
|
protected void setUp() throws Exception {
|
||
|
super.setUp();
|
||
13 years ago
|
|
||
|
shift1 = 10;
|
||
|
shift2 = 17;
|
||
13 years ago
|
w = (int)(rgbLena.cols() / 2);
|
||
|
h = (int)(rgbLena.rows() / 2);
|
||
13 years ago
|
|
||
|
subLena1 = rgbLena.submat(shift1, h + shift1, shift1, w + shift1);
|
||
|
subLena2 = rgbLena.submat(shift2, h + shift2, shift2, w + shift2);
|
||
|
|
||
13 years ago
|
prevPts = new MatOfPoint2f(new Point(11d, 8d), new Point(5d, 5d), new Point(10d, 10d));
|
||
13 years ago
|
|
||
13 years ago
|
nextPts = new MatOfPoint2f();
|
||
|
status = new MatOfByte();
|
||
|
err = new MatOfFloat();
|
||
13 years ago
|
}
|
||
|
|
||
|
public void testCalcGlobalOrientation() {
|
||
|
fail("Not yet implemented");
|
||
|
}
|
||
|
|
||
|
public void testCalcMotionGradientMatMatMatDoubleDouble() {
|
||
|
fail("Not yet implemented");
|
||
|
}
|
||
|
|
||
|
public void testCalcMotionGradientMatMatMatDoubleDoubleInt() {
|
||
|
fail("Not yet implemented");
|
||
|
}
|
||
|
|
||
|
public void testCalcOpticalFlowFarneback() {
|
||
|
fail("Not yet implemented");
|
||
|
}
|
||
|
|
||
13 years ago
|
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloat() {
|
||
|
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err);
|
||
13 years ago
|
assertEquals(3, Core.countNonZero(status));
|
||
13 years ago
|
}
|
||
13 years ago
|
|
||
13 years ago
|
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSize() {
|
||
|
Size sz = new Size(3, 3);
|
||
13 years ago
|
Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err, sz, 3);
|
||
13 years ago
|
assertEquals(0, Core.countNonZero(status));
|
||
13 years ago
|
}
|
||
|
|
||
13 years ago
|
|
||
13 years ago
|
public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDoubleIntDouble() {
|
||
|
fail("Not yet implemented");
|
||
|
}
|
||
13 years ago
|
|
||
|
public void testCamShift() {
|
||
|
fail("Not yet implemented");
|
||
|
}
|
||
|
|
||
|
public void testEstimateRigidTransform() {
|
||
|
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");
|
||
|
}
|
||
14 years ago
|
|
||
|
}
|