使用下面给出的代码调整多个图像的大小
i=0
labels=[]
train_data = []
for img in (glob.glob(folder_path)):
test_image = cv2.imread(img)
labels.append(img[58:-4])
test_image = cv2.resize(test_image, ( (272,272)))
train_data.append(test_image)
cv2.imwrite('C:/Users/HIMANSHU/Documents/Python Scripts/input/material_resize/'+labels[i]+'.jpeg',train_data[i])
i=i+1
我收到以下错误:
文件"",第7行,in test_image = cv2.resize(test_image,((272,272)))
错误: C:\ bld \ opencv_1510966172919 \ work \ opencv-3.3.0 \ modules \ imgproc \ src \ imgwarp.cpp:3483:错误:(-215)ssize.width> 0&& ssize.height> 0在功能上 CV ::调整大小