title: AttributeError: module 'cv2' has no attribute 'createStereoBM'
body: <p>I tried to run code from the OpenCV docs for creating a disparity image from left and right stereo images, but it gives me an error. Here is the code I ran.</p>
  
  <pre><code>import cv2
  from matplotlib import pyplot as plt
  
  imgL = cv2.imread(r'D:\left.png', 0)
  imgR = cv2.imread(r'D:\right.png', 0)
  
  stereo = cv2.createStereoBM(numDisparities=16, blockSize=15)
  disparity = stereo.compute(imgL, imgR)
  plt.imshow(disparity, 'gray')
  plt.show()
  </code></pre>
  
  <p>I am getting an error in the line</p>
  
  <pre><code>stereo = cv2.createStereoBM(numDisparities=16, blockSize=15)
  </code></pre>
  
  <p>And this is the error</p>
  
  <pre><code>AttributeError: module 'cv2' has no attribute 'createStereoBM'
  </code></pre>
  
  <p>I have tried many other solutions previously listed on stackoverflow, github, and other forums but none of them seemed to work.</p>
  
  <p>The link to the OpenCV documentation can be found <a href="https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_calib3d/py_depthmap/py_depthmap.html" rel="noreferrer">here</a></p>
  
  <p>Any help will be appreciated. Thanks.</p>