对Python+opencv将图片生成视频的实例详解
程序员文章站
2023-12-11 08:58:04
如下所示:
import cv2
fps = 16
size = (width,height)
videowriter = cv2.videowr...
如下所示:
import cv2 fps = 16 size = (width,height) videowriter = cv2.videowriter("a.avi",cv2.videowriter_fourcc('m','j','p','g'),fps,size) for i in range(1,200): img = cv2.imread('%d'.jpg % i) videowriter.write(img)
以上这篇对python+opencv将图片生成视频的实例详解就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。