Beispiel #1
0
 def frameSize(self):
     videoName = VIDEO_EXAMPLE_PATH.format(self.videoname)
     video = Video(videoName)
     success, frame = video.read()
     video.release()
     # Test frame width
     self.assertEqual(frame.matrix.shape, (720, 1280, 3),
                      msg="Dimensions of the frame does not match")
Beispiel #2
0
 def videoRead(self):
     videoname = VIDEO_EXAMPLE_PATH.format(self.videoname)
     video = Video(videoname)
     success, frame = video.read()
     video.release()
     # Test reading
     self.assertTrue(success, msg="Video is not reading")
     # Test frame type
     self.assertIsInstance(frame, Frame, msg="Reader does not return Frame")
Beispiel #3
0
 def frameExportImport(self):
     videoname = VIDEO_EXAMPLE_PATH.format(self.videoname)
     video = Video(videoname)
     success, frame = video.read()
     video.release()
     filename = VIDEO_EXAMPLE_PATH.format("frameMatrix.pk")
     ObjectPickler.save(frame, filename)
     frame2 = ObjectPickler.load(Frame, filename)
     self.assertEqual(frame,
                      frame2,
                      msg="Readed frame different of ground truth")