【opencv-python】 截取视频指定帧数并保存

(1)读取文件: video = cv.VideoCapture('video.avi') # 读取视频文件 (2)分帧读取视频: ret,frame = video.read() (3)对每一个帧图像进行保存: cv.imwrite('D:\\save\\'+str(i)+'.png',frame) 看下面的完整程序 import cv2 as cv #截图图像 def cutVideo()
相关文章
相关标签/搜索