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()
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
Post a Comment