title: AttributeError: 'module' object has no attribute 'cv'
body: <p>I am getting the following error while trying to do a BGR to binary threshhold conversion.</p>
  
  <blockquote>
    <p>imgthreshhold = cv2.inRange(img, cv2.cv.Scalar(3,3,125),
    cv2.cv.Scalar(40,40,255)) AttributeError: 'module' object has no
    attribute 'cv'</p>
  </blockquote>
  
  <p>Following is the complete program.</p>
  
  <pre><code>import cv2
  
  cap = cv2.VideoCapture(0)
  #help(cv2)
  while cap.isOpened():
      #BGR image feed from camera
      ret, img = cap.read()
      cv2.imshow('output', img)
      #BGR to grayscale
      img2 = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
      cv2.imshow('grayscale', img2)
      #BGR to binary(RED) thershholded
      imgthreshhold = cv2.inRange(img, cv2.cv.Scalar(3,3,125), cv2.cv.Scalar(40,40,255))
      cv2.imshow('threshholded', imgthreshhold)
  
      k = cv2.waitKey(10)
      if k==27:
          break
  
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>How can I fix this?</p>