2011-07-07 22:35:12 +08:00
|
|
|
package org.opencv.test.highgui;
|
|
|
|
|
2011-08-05 16:39:28 +08:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.opencv.core.Size;
|
2014-07-10 22:27:32 +08:00
|
|
|
import org.opencv.videoio.Videoio;
|
|
|
|
import org.opencv.videoio.VideoCapture;
|
2011-07-07 22:35:12 +08:00
|
|
|
|
|
|
|
import org.opencv.test.OpenCVTestCase;
|
|
|
|
|
|
|
|
public class VideoCaptureTest extends OpenCVTestCase {
|
2011-08-02 21:47:40 +08:00
|
|
|
|
|
|
|
private VideoCapture capture;
|
|
|
|
private boolean isOpened;
|
2011-08-05 16:39:28 +08:00
|
|
|
private boolean isSucceed;
|
2011-08-02 21:47:40 +08:00
|
|
|
|
2011-07-07 22:35:12 +08:00
|
|
|
@Override
|
|
|
|
protected void setUp() throws Exception {
|
|
|
|
super.setUp();
|
2011-08-02 21:47:40 +08:00
|
|
|
|
2011-07-07 22:35:12 +08:00
|
|
|
capture = null;
|
2012-11-12 21:47:20 +08:00
|
|
|
isTestCaseEnabled = false;
|
2011-07-07 22:35:12 +08:00
|
|
|
isSucceed = false;
|
|
|
|
isOpened = false;
|
|
|
|
}
|
2011-08-02 21:47:40 +08:00
|
|
|
|
|
|
|
public void testGrab() {
|
|
|
|
capture = new VideoCapture();
|
|
|
|
isSucceed = capture.grab();
|
|
|
|
assertFalse(isSucceed);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void testIsOpened() {
|
|
|
|
capture = new VideoCapture();
|
|
|
|
assertFalse(capture.isOpened());
|
|
|
|
}
|
|
|
|
|
|
|
|
public void testVideoCapture() {
|
|
|
|
capture = new VideoCapture();
|
2011-08-05 16:39:28 +08:00
|
|
|
assertNotNull(capture);
|
|
|
|
assertFalse(capture.isOpened());
|
2011-08-02 21:47:40 +08:00
|
|
|
}
|
|
|
|
|
2011-07-07 22:35:12 +08:00
|
|
|
}
|