如下所示:
import os
from PIL import Image
filename = os.listdir(D:\\Work\\process\\样本处理\\polyu-all-train)
base_dir = D:\\Work\\process\\样本处理\\polyu-all-train\\
new_dir = D:\\Work\\process\\样本处理\\polyu\\
size_m = 128
size_n = 128
for img in filename:
image = Image.open(base_dir + img)
image_si
1