simulation.utils.machine_learning.data.images_to_video module

Summary

Functions:

images_to_video

This function takes images and put them into a video.

make_2x2_video_grid

This function takes 4 images and puts them into a 2x2 Grid.

Reference

images_to_video(image_pattern: str, output_file: str, scale: Tuple[int, int] = (1280, 650)) → None[source]

This function takes images and put them into a video.

Parameters
  • image_pattern – an pattern for all images. For example “images/%d_real_b.png” will match files like “images/5_real_b.png”

  • output_file – the output file for example “videos/real_b.mp4”

  • scale – scaling each image to this dimension so you can scale each image to format 1280x650

make_2x2_video_grid(video_paths: List[str], output_file: str)[source]

This function takes 4 images and puts them into a 2x2 Grid.

Parameters
  • video_paths – array of paths to the 4 videos

  • output_file – output file for the resulting video