32 from __future__
import print_function
40 """A class to save images into a video""" 43 self.
fourcc = cv2.VideoWriter_fourcc(*
'mp4v')
44 if video_name
is "" or video_name
is True:
46 datetime.datetime.now().strftime(
"%Y-%m-%d__%H:%M:%S")
49 (height, width, _) = image.shape
58 """ Close video if opened 59 Since, we need it also in reopen module put in in separate function 65 if self.
h_video_out is not None and self.h_video_out.isOpened():
67 self.h_video_out.release()
73 count (int) The frame number 86 if self.h_video_out.isOpened():
87 rospy.loginfo(
"Open video stream {0} of size ({1}, {2})".format(video_name, self.
video_sz[0],self.
video_sz[1]))
89 rospy.logfatal(
"Failed to open video {0}".format(video_name))
92 """Print info for debug """ 95 rospy.logdebug(
'Video_base_name: {0} is opened: {1}'.\