Ask Your Question

Revision history [back]

AttributeError: 'module' object has no attribute 'createBackgroundSubtractorMOG'

I was reading a tutorial on opencv-python documentation in which they use cv2.createBackgroundSubtractorMOG() function but when i try this i got following error.

AttributeError: 'module' object has no attribute 'createBackgroundSubtractorMOG'

Please help me. If this function is not present then what is alternative ? Please tell me. The tutorial about which i am talking is http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.html