title: OpenCV(4.2.0) (-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type in function 'cvGetMat'
body: <p>i am trying to inpaint on a 8000x4000 image, and a 8000x4000 binary mask but getting the following error.</p>
  
  <blockquote>
    <p>error                                     Traceback (most recent call
    last)  in 
          1 img = cv.imread('input/200130_033344133.jpg')
          2 mask = cv.imread('resources/maskX.png',0)
    ----> 3 dst = cv.inpaint(img,mask,3,cv.INPAINT_TELEA)
          4 cv.imshow('dst',dst)
          5 cv.waitKey(0)</p>
    
    <p>error: OpenCV(4.2.0)
    C:\projects\opencv-python\opencv\modules\core\src\array.cpp:2492:
    error: (-206:Bad flag (parameter or structure field)) Unrecognized or
    unsupported array type in function 'cvGetMat'</p>
  </blockquote>
  
  <p>here is my code.
  what i tried was to convert the image and the mask to numpy array or cv2.UMat. but all in vain</p>
  
  <pre><code>img = cv.imread('input/200130_033344133.jpg')
  mask = cv.imread('resources/maskX.png',0)
  dst = cv.inpaint(img,mask,3,cv.INPAINT_TELEA)
  cv.imshow('dst',dst)
  cv.waitKey(0)
  cv.destroyAllWindows()
  </code></pre>
  
  <p>any reason why its not working?
  the images are loading properly i checked.</p>