import numpy as np import cv2 cap = cv2.VideoCapture(\'vtest.avi\') fgbg = cv2.bgsegm.createBackgroundSubtractorMOG() while(1): ret, frame = cap.read() fgmask =
You need to install the contrib dependencies to get this working as it isn't part of the standard build.
contrib
pip install opencv-contrib-python