import pyautogui
import cv2
scr = pyautogui.screenshot()
img = cv2.resize(scr, (0, 0), fx=1, fy=1)
报错看不懂:
cv2.error: OpenCV(4.5.4) :-1: error: (-5:Bad argument) in function 'resize'
Overload resolution failed:
- src is not a numpy array, neither a scalar
- Expected Ptrcv::UMat for argument 'src'
我去查了一下,发现cv2.resize的参数scr可以由cv2.imread(filename)返回得到,但令我困惑的是,imread竟然返回None。
对于这一点我不太理解,哪位帮帮我,谢谢!