def get_video(args): video_capture = VideoCapture(args.video, video_output=args.save_path) video_capture.create_capture() width = int(video_capture.cap.get(3)) height = int(video_capture.cap.get(4)) size=(width,height) if args.save_video: video_capture.create_output(fps=args.fps, size=size, isColor=args.is_color, source=cv2.VideoWriter_fourcc(*"XVID")) return video_capture.cap, video_capture.out, size
def get_video_text(args): video_capture = VideoCapture(args.video_text) if args.save_video: video_capture.create_output() return video_capture.cap, video_capture.out
def get_video_vehicle(args): video_capture = VideoCapture("../Service/out_semantic2.avi") video_capture.create_capture() if args.save_video: video_capture.create_output() return video_capture.cap, video_capture.out
def get_video_text(args): video_capture = VideoCapture("../Service/text_detect_output.avi") video_capture.create_capture() if args.save_video: video_capture.create_output() return video_capture.cap, video_capture.out