1793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerpackage org.opencv.test.highgui; 2793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 3793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerimport java.util.List; 4793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 5793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerimport org.opencv.core.Size; 6793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerimport org.opencv.videoio.Videoio; 7793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerimport org.opencv.videoio.VideoCapture; 8793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 9793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerimport org.opencv.test.OpenCVTestCase; 10793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 11793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerpublic class VideoCaptureTest extends OpenCVTestCase { 12793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 13793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler private VideoCapture capture; 14793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler private boolean isOpened; 15793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler private boolean isSucceed; 16793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 17793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler @Override 18793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler protected void setUp() throws Exception { 19793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler super.setUp(); 20793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 21793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler capture = null; 22793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler isTestCaseEnabled = false; 23793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler isSucceed = false; 24793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler isOpened = false; 25793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 26793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 27793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler public void testGrab() { 28793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler capture = new VideoCapture(); 29793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler isSucceed = capture.grab(); 30793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler assertFalse(isSucceed); 31793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 32793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 33793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler public void testIsOpened() { 34793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler capture = new VideoCapture(); 35793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler assertFalse(capture.isOpened()); 36793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 37793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 38793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler public void testVideoCapture() { 39793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler capture = new VideoCapture(); 40793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler assertNotNull(capture); 41793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler assertFalse(capture.isOpened()); 42793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 43793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 44793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler} 45