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)