import cv2 import numpy as np
Read the video
cap = cv2.VideoCapture('video.avi')
Frame size
frame_width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) frame_height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
Kalman Filter
kalman = cv2.KalmanFilter(4,2)