diff --git a/python/play_road_boundary.py b/python/play_road_boundary.py index f8ec051..333b538 100644 --- a/python/play_road_boundary.py +++ b/python/play_road_boundary.py @@ -48,6 +48,8 @@ images = sorted(image_path.glob('*.png')) masks = sorted(mask_path.glob('*.png')) +fname = f"{args.trial}_{args.camera_id}_{args.type}_{args.masks_id}" + initialised = False for image, mask in tqdm(zip(images, masks)): image = load_road_boundary_image(str(image)) @@ -70,11 +72,13 @@ if args.save_video: if not initialised: framesize = (image.shape[1], image.shape[0]) - out = cv2.VideoWriter(str(Path(args.save_dir) / 'output_video.avi'), \ + out = cv2.VideoWriter(str(Path(args.save_dir) / f'{fname}.avi'), \ cv2.VideoWriter_fourcc(*'MPEG'), 20, framesize, True) initialised = True + cv2.imwrite(str(Path(args.save_dir) / f'{fname}.jpg'), image_) + out.write(image_) out.release()