Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

createBackgroundSubtractor() segmentation fault

$
0
0
I'm using Python 2.7.10 and OpenCV '3.0.0' I'm trying to run the tutorials provided here...http://docs.opencv.org/master/db/d5c/tutorial_py_bg_subtraction.html#gsc.tab=0 I'm using the exact same code but I'm getting a Segmentation fault: 11 import numpy as np import cv2 cap = cv2.VideoCapture('tree.avi') fgbg = cv2.createBackgroundSubtractorMOG2() while(1): ret, frame = cap.read() fgmask = fgbg.apply(frame) cv2.imshow('frame',fgmask) k = cv2.waitKey(30) & 0xff if k == 27: break cap.release() cv2.destroyAllWindows() Also when I try createBackgroundSubtractorMOG() or createBackgroundSubtractorGMG(), I get this AttributeError: 'module' object has no attribute 'createBackgroundSubtractorGMG'.....what the heck is going on?

Viewing all articles
Browse latest Browse all 41027

Trending Articles