def enable_videowriter(self, output_filename, fourcc_string="MJPG",
fps=None):
""" Write images to video file.
Parameters
----------
output_filename : str
Output filename.
fourcc_string : str
The OpenCV FOURCC code that defines the video codec (check OpenCV
documentation for more information).
fps : Optional[float]
Frames per second. If None, configured according to current
parameters.
"""
fourcc = cv2.VideoWriter_fourcc(*fourcc_string)
if fps is None:
fps = int(1000. / self._update_ms)
self._video_writer = cv2.VideoWriter(
output_filename, fourcc, fps, self._window_shape)
评论列表
文章目录