Created
July 23, 2022 03:28
-
-
Save sergiolucero/f2949d653b1b4bd8c7988eadba025444 to your computer and use it in GitHub Desktop.
movie_maker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import cv2 | |
images = glob.glob('Plot*.png') | |
print('nImages:', len(images)) | |
height, width, layers = cv2.imread(images[0]).shape | |
video = cv2.VideoWriter('video.avi', 0, 1, (width,height)) | |
for image in images: | |
video.write(cv2.imread(image)) | |
cv2.destroyAllWindows() | |
video.release() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment