March 2018
Beginner to intermediate
306 pages
9h 54m
English
You need to complete the following steps:
import cv2
video = cv2.VideoCapture('../data/traffic.mp4')prev_pts = Noneprev_gray_frame = Nonetracks = None
while True: retval, frame = video.read() if not retval: break gray_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
if prev_pts is not None: pts, status, errors = cv2.calcOpticalFlowPyrLK( prev_gray_frame, ...