def _write_video(self, im):
if self.writer is None:
h, w = im.shape[:2]
self.writer = cv2.VideoWriter(self.filename, cv2.cv.CV_FOURCC(*'mp42'),
30.0, (w, h), im.ndim == 3)
print('{} :: creating {} ({},{})'.format(self.__class__.__name__, self.filename, w, h))
self.writer.write(im)
评论列表
文章目录