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.
44 lines
976 B
44 lines
976 B
package org.opencv.test.highgui; |
|
|
|
import java.util.List; |
|
|
|
import org.opencv.core.Size; |
|
import org.opencv.videoio.Videoio; |
|
import org.opencv.videoio.VideoCapture; |
|
|
|
import org.opencv.test.OpenCVTestCase; |
|
|
|
public class VideoCaptureTest extends OpenCVTestCase { |
|
|
|
private VideoCapture capture; |
|
private boolean isOpened; |
|
private boolean isSucceed; |
|
|
|
@Override |
|
protected void setUp() throws Exception { |
|
super.setUp(); |
|
|
|
capture = null; |
|
isTestCaseEnabled = false; |
|
isSucceed = false; |
|
isOpened = false; |
|
} |
|
|
|
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(); |
|
assertNotNull(capture); |
|
assertFalse(capture.isOpened()); |
|
} |
|
|
|
}
|
|
|