Skip to content

Instantly share code, notes, and snippets.

@0xbustos
Created January 24, 2018 20:03
Show Gist options
  • Save 0xbustos/bfd7d25a100b3c21b6d93ce93f808376 to your computer and use it in GitHub Desktop.
Save 0xbustos/bfd7d25a100b3c21b6d93ce93f808376 to your computer and use it in GitHub Desktop.
Create a small timelapse using opencv
import cv2
img1 = cv2.imread('1.jpg')
img2 = cv2.imread('2.jpg')
img3 = cv2.imread('3.jpg')
height , width , layers = img1.shape
video = cv2.VideoWriter('video.avi',-1,1,(width,height))
video.write(img1)
video.write(img2)
video.write(img3)
cv2.destroyAllWindows()
video.release()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment