title: OpenCV2 Python createBackgroundSubtractor module not found
body: <p>I am trying to use cv2.createBackgroundSubtractorMOG2 () method in Python. I have tried both on my Mac and on my Raspberry Pi, and get the same error when running the following line of code:</p>
  
  <pre><code>fgbg = cv2.createBackgroundSubtractorMOG2()
  </code></pre>
  
  <p>The code I am using is taken from <a href="https://github.com/abidrahmank/OpenCV2-Python-Tutorials/blob/master/source/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.rst" rel="noreferrer">https://github.com/abidrahmank/OpenCV2-Python-Tutorials/blob/master/source/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.rst</a></p>
  
  <p>I get the following error when running this code:</p>
  
  <blockquote>
    <p>fgbg = cv2.createBackgroundSubtractorMOG2()
    AttributeError: 'module' object has no attribute 'createBackgroundSubtractorMOG2'</p>
  </blockquote>
  
  <p>I can't seem to use any of the createBackgroundSubtractor methods.</p>
  
  <p>I have been trying to solve this for the past day, but I have had no luck searching online, as there is limited support for cv2 on Python.</p>
  
  <p>Thanks in advance</p>