• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.opencv.test.video;
2 
3 import org.opencv.core.Core;
4 import org.opencv.core.Mat;
5 import org.opencv.core.MatOfByte;
6 import org.opencv.core.MatOfFloat;
7 import org.opencv.core.MatOfPoint2f;
8 import org.opencv.core.Point;
9 import org.opencv.core.Size;
10 import org.opencv.test.OpenCVTestCase;
11 import org.opencv.video.Video;
12 
13 public class VideoTest extends OpenCVTestCase {
14 
15     private MatOfFloat err = null;
16     private int h;
17     private MatOfPoint2f nextPts = null;
18     private MatOfPoint2f prevPts = null;
19 
20     private int shift1;
21     private int shift2;
22 
23     private MatOfByte status = null;
24     private Mat subLena1 = null;
25     private Mat subLena2 = null;
26     private int w;
27 
28     @Override
setUp()29     protected void setUp() throws Exception {
30         super.setUp();
31 
32         shift1 = 10;
33         shift2 = 17;
34         w = (int)(rgbLena.cols() / 2);
35         h = (int)(rgbLena.rows() / 2);
36 
37         subLena1 = rgbLena.submat(shift1, h + shift1, shift1, w + shift1);
38         subLena2 = rgbLena.submat(shift2, h + shift2, shift2, w + shift2);
39 
40         prevPts = new MatOfPoint2f(new Point(11d, 8d), new Point(5d, 5d), new Point(10d, 10d));
41 
42         nextPts = new MatOfPoint2f();
43         status = new MatOfByte();
44         err = new MatOfFloat();
45     }
46 
testCalcGlobalOrientation()47     public void testCalcGlobalOrientation() {
48         fail("Not yet implemented");
49     }
50 
testCalcMotionGradientMatMatMatDoubleDouble()51     public void testCalcMotionGradientMatMatMatDoubleDouble() {
52         fail("Not yet implemented");
53     }
54 
testCalcMotionGradientMatMatMatDoubleDoubleInt()55     public void testCalcMotionGradientMatMatMatDoubleDoubleInt() {
56         fail("Not yet implemented");
57     }
58 
testCalcOpticalFlowFarneback()59     public void testCalcOpticalFlowFarneback() {
60         fail("Not yet implemented");
61     }
62 
testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloat()63     public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloat() {
64         Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err);
65         assertEquals(3, Core.countNonZero(status));
66     }
67 
testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSize()68     public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSize() {
69         Size sz = new Size(3, 3);
70         Video.calcOpticalFlowPyrLK(subLena1, subLena2, prevPts, nextPts, status, err, sz, 3);
71         assertEquals(0, Core.countNonZero(status));
72     }
73 
74 
testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDoubleIntDouble()75     public void testCalcOpticalFlowPyrLKMatMatListOfPointListOfPointListOfByteListOfFloatSizeIntTermCriteriaDoubleIntDouble() {
76         fail("Not yet implemented");
77     }
78 
testCamShift()79     public void testCamShift() {
80         fail("Not yet implemented");
81     }
82 
testEstimateRigidTransform()83     public void testEstimateRigidTransform() {
84         fail("Not yet implemented");
85     }
86 
testMeanShift()87     public void testMeanShift() {
88         fail("Not yet implemented");
89     }
90 
testSegmentMotion()91     public void testSegmentMotion() {
92         fail("Not yet implemented");
93     }
94 
testUpdateMotionHistory()95     public void testUpdateMotionHistory() {
96         fail("Not yet implemented");
97     }
98 
99 }
100