Skip to content

Commit

Permalink
Merge branch 'road_boundaries' of github.com:ori-mrg/robotcar-dataset…
Browse files Browse the repository at this point in the history
…-sdk into road_boundaries
  • Loading branch information
danieledema committed Apr 23, 2021
2 parents ebc2609 + afc12a3 commit 15e5a37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/play_road_boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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()

0 comments on commit 15e5a37

Please sign in to comment.