问题描述
我正在尝试用python写代码来重新调整特定文件夹中的图像大小并将输出保存到其他指定的文件夹中。我无法将图像保存在文件夹名称为“ Resized”的outPath中。谁能帮我这个忙...
import os
import cv2,glob
imgPath = "E:/Data/Ori"
outPath = "E:/Data/Resized"
images = glob.glob(imgPath + "/" + "*.jpg")
for image in images:
img = cv2.imread(image,1) #1 for color scale
res = cv2.resize(img,(400,300)) #width = 400,height = 300
cv2.imwrite(outPath + '/' + image,res) #Unable to save the images in 'Resized' folder
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)