title: error: (-215:Assertion failed) _src.total() > 0 in function 'cv::warpPerspective'
body: <pre><code>import cv2
  import numpy as np
  
  img = cv2.imread(&quot;images/Back.jpg&quot;)
  
  width,height = 250,350
  pts1 = np.float32([[111,219],[287,188],[154,482],[352,440]])
  pts2 = np.float32([[0,0],[width,0],[0,height],[width,height]])
  matrix = cv2.getPerspectiveTransform(pts1,pts2)
  imgOutput = cv2.warpPerspective(img,matrix,(width,height))
  
  
  cv2.imshow(&quot;Image&quot;, img)
  cv2.imshow(&quot;Output&quot;,imgOutput)
  
  cv2.waitkey(0)
  </code></pre>
  <p>I am receiving the following error for this code:</p>
  <pre><code>error: (-215:Assertion failed) _src.total() &gt; 0 in function 'cv::warpPerspective'
  </code></pre>
  <p>I am trying to get a birds eye view of an image. Can someone see what I am doing wrong, or what I am failing to do?</p>