39 """Hadle when the program exits. calculate the statistics and close any open cv2 device 41 camera (Camera) the Camera being used 42 video_out (VideoSaver) the VideoSaver being used 43 statistics_engine (StatisticsEngine) the StatisticsEngine being used""" 44 if "cv2" in camera.camera_type
and camera.video_source.isOpened():
45 camera.video_source.release()
47 if (video_out
is not None and 48 video_out.h_video_out
is not None and 49 video_out.h_video_out.isOpened()):
50 video_out.h_video_out.release()
51 stat_string = statistics_engine.process_statistics()
52 rospy.logerr(stat_string)
53 cv2.destroyAllWindows()
58 This function is not too correct if the argument is not any of True/False case 61 if s.lower()
in (
'yes',
'true',
't',
'y',
'1'):
63 elif s.lower()
in (
'no',
'false',
'f',
'n',
'0'):