Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
movie_maker
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