import numpy as np import cv2 cap = cv2.VideoCapture(\'vtest.avi\') fgbg = cv2.bgsegm.createBackgroundSubtractorMOG() while(1): ret, frame = cap.read() fgmask =
I'm using 3.4.2.16 Version of OpencV, you can try this version of OpencV