dgs.utils.image.combine_images_to_video

dgs.utils.image.combine_images_to_video(imgs: torchvision.tv_tensors.Image | torch.Tensor | list[torchvision.tv_tensors.Image | torch.Tensor] | str, video_file: str, fps: int = 30, **kwargs) None[source]

Combine multiple images into a single video. Images can either be a stacked image, a list of single images, or a path to a directory containing images.

The image data is expected to be in regular format [1 x C x H x W]. This function will then transform the images into a single uint8 video tensor of shape [N x H x W x C]