March 2018
Beginner to intermediate
306 pages
9h 54m
English
The steps for this recipe are:
import cv2capture = cv2.VideoCapture('../data/drop.avi')frame_count = int(capture.get(cv2.CAP_PROP_FRAME_COUNT))print('Frame count:', frame_count)
print('Position:', int(capture.get(cv2.CAP_PROP_POS_FRAMES)))_, frame = capture.read()cv2.imshow('frame0', frame)
print('Position:', capture.get(cv2.CAP_PROP_POS_FRAMES))_, frame = capture.read()cv2.imshow('frame1', frame)
capture.set(cv2.CAP_PROP_POS_FRAMES, 100)print('Position:', int(capture.get(cv2.CAP_PROP_POS_FRAMES))) ...Read now
Unlock full access