January 2018
Intermediate to advanced
310 pages
7h 48m
English
A video can be converted to frames and saved in a directory for further usage. Splitting into frames helps us save time by decompressing the video before the training process. First, let's see a code snippet for converting video to frames:
import cv2video_handle = cv2.VideoCapture(video_path)frame_no = 0while True: eof, frame = video_handle.read() if not eof: break cv2.imwrite("frame%d.jpg" % frame_no, frame) frame_no += 1
Read now
Unlock full access