title: TypeError: Expected Ptr<cv::UMat> for argument 'src'?
body: <p>Whenever im tying to dilate an image using cv2.dilate i get TypeError: Expected Ptr&lt;cv::UMat&gt; for argument 'src' error for the image I'm giving as input.</p>
  <pre><code>frameDelta = cv2.absdiff(firstFrame, gray)
  cv2.imshow(&quot;frameDelta&quot;,frameDelta)
  thresh = cv2.threshold(frameDelta, 25,255,cv2.THRESH_BINARY)
  thresh = cv2.dilate(thresh, None, iterations = 2)   
  </code></pre>
  <p>I have already tried cv2.UMat(thresh) and when i use that I get TypeError: Required argument 'ranges' (pos 2) not found</p>