cv2.error: OpenCV(4.5.5) 👎 error: (-5:Bad argument) in function ‘imwrite’
Overload resolution failed:
- img is not a numpy array, neither a scalar
- Expected Ptrcv::UMat for argument ‘img’
解决办法:
import numpy as np
np.array(image)
或者直接用cv2读取图像
cv2.imread(pic_path)