OpenCV出错,怎么修改

OpenCV出错了,怎么修改?

错误:
GWVD = cv2.resize(abs(GWVD), (int(2048/32), int(2048/32)))
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'resize'

Overload resolution failed:

  • src data type = 17 is not supported
  • Expected Ptrcv::UMat for argument 'src'
      出错的代码块:
                GWVD = SemisoftThresh(GWVD, t)
                # 转化成64×64的二维图
                GWVD = np.array(GWVD)
                GWVD = cv2.resize(abs(GWVD), (int(2048/32), int(2048/32)))
                train_pics.append(GWVD)
                train_labels.append(data_type)

GWVD这个变量作为resize的输入图,类型不支持

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^