Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

module 'cv2' has no attribute 'createBackgroundSubtractorMOG'

I am using Python 3.5.1 and opencv 3.1.0. I am trying to use cv2.createBackgroundSubtractorMOG() method in Python.

I get the following error when running the code : fgbg = cv2.createBackgroundSubtractorMOG() AttributeError: module 'cv2' has no attribute 'createBackgroundSubtractorMOG2'

Code I am using is from http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.html#py-background-subtraction

I tried searching online but not able to solve problem. Please help me out, Thanks in advance.