mindelec.vision.image_to_video
- mindelec.vision.image_to_video(path_image, path_video, video_name, fps)[source]
Create video from existing images.
- Parameters
path_image (str) – image path, all images are jpg. image names in path_image should be like:
"00.jpg"
,"01.jpg"
,"02.jpg"
, …"09.jpg"
,"10.jpg"
,"11.jpg"
,"12.jpg"
…path_video (str) – video path, video saved path.
video_name (str) – video name(.avi file)
fps (int) – Specifies how many pictures per second in video.
- Supported Platforms:
Ascend
Examples
>>> import numpy as np >>> from mindelec.vision import plot_eh, image_to_video >>> path_image = './images' >>> eh = np.random.rand(5, 10, 10, 10, 6).astype(np.float32) >>> plot_eh(eh, path_image, 5, 300) >>> path_video = './result_video' >>> video_name = 'video.avi' >>> fps = 10 >>> image_to_video(path_image, path_video, video_name, fps)