title: What does image0.dims == 2 mean? How can I solve this?
body: <pre><code>import cv2
  from cv2 import dnn_superres
  import os
  
  sr = dnn_superres.DnnSuperResImpl_create()
  path = &quot;D:/Nadia - Il segreto della Pietra Azzurra/EDSR_x2.pb&quot;
  sr.readModel(path)
  sr.setModel(&quot;edsr&quot;, 2)
  
  i = 0
  for _ in range(39):
      i += 1
      fileprocessed = 'Nadia - Il segreto della Pietra Azzurra ' + str(i) + 'ep'
      print('Processando il file ' + fileprocessed)
      vidcap = cv2.VideoCapture(fileprocessed + '.mp4')
      os.mkdir(fileprocessed)
      os.chdir(fileprocessed)
      success,image = vidcap.read()
      count = 0
      while success:
          cv2.imwrite('frame%d.jpg' % count, image)
          os.system(&quot;pause&quot;)
          image = cv2.imread('frame%d.jpg')
          result = sr.upsample(image)
          cv2.imwrite(&quot;frame%dup.jpg&quot; % count, result)
          os.system(&quot;pause&quot;)
          success,image = vidcap.read()
          count += 1
      print('Concluso con il file ' + fileprocessed)
      os.remove(fileprocessed  + '.mp4')
      os.system('cd ..') 
  </code></pre>
  <p>The error is the following:</p>
  <p>Traceback (most recent call last):
  File &quot;.\enhancer.py&quot;, line 24, in 
  result = sr.upsample(image)
  cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-rwld3ghi\opencv\modules\dnn\src\dnn.cpp:360: error: (-215:Assertion failed) image0.dims == 2 in function 'cv::dnn::dnn4_v20200609::blobFromImages'</p>
  <p>The objective of the following program is to take a large mp4 video, cut it into individual frames and upscale them. Then I'll add a frame interpolation and a video from frames creator all with python, but I'm doing this one step at a time! Thanks in advance!</p>