title: error: OpenCV(4.1.0) error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
body: <p>This is the error I get:</p>
  <blockquote>
  <p>error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'</p>
  </blockquote>
  <p>Already checked for corrupted files.</p>
  <p><code>cat</code> is an array of 1000 images (RGB).</p>
  <p>I am trying to compress these images to (50,50) grayscale.</p>
  <pre><code>def greyscale_compress(img):
      new_img = cv2.resize(img, (50,50))
      img_gray = cv2.cvtColor(new_img, cv2.COLOR_BGR2GRAY)
      return img_gray
  
  cat_bin = []
  for i in range(0, 100):
      cat_bin.append(greyscale_compress(cat[i]))
  </code></pre>