For creating a video from images - Raspberry Pi Forums


hello sir
have 20 bmp images want create video, use code given below can see 1 frame(one image) contineous images see should do?

import cv2

img1 = cv2.imread('1.bmp')
img2 = cv2.imread('2.bmp')
img3 = cv2.imread('3.bmp')

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()

there ffmeg (or avconv) utility available can make video individual files.


raspberrypi



Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support