源代码:
img = np.rot90(img)
orig_img = img.copy()
报错:TypeError: Expected Ptr<cv::UMat> for argument 'img'
修改为:
img = np.ascontiguousarray(np.rot90(img))
orig_img = img.copy()
解决~
参考:
https://blog.csdn.net/weixin_43840139/article/details/109570933