Assuming that you want to save files from a video recording, you can do this :
import cv2
vid = cv2.VideoCapture("video.mp4")
d = 0 ret, frame = vid.read() while ret: ret, frame = vid.read() filename = "images/file_%d.jpg"%d cv2.imwrite(filename, frame) d+=1
![]() | 2 | No.2 Revision |
Assuming that you want to save files from a video recording, you can do this :
import cv2cv2
vid = cv2.VideoCapture("video.mp4")
vid = cv2.VideoCapture("video.mp4")
d = 0
ret, frame = vid.read()
while ret:
ret, frame = vid.read()
filename = "images/file_%d.jpg"%d
cv2.imwrite(filename, frame)
d+=1
d+=1
![]() | 3 | No.3 Revision |
Assuming that you want to save files from a video recording, you can do this :
import cv2
vid = cv2.VideoCapture("video.mp4")
d = 0
ret, frame = vid.read()
while ret:
ret, frame = vid.read()
filename = "images/file_%d.jpg"%d
cv2.imwrite(filename, frame)
d+=1