1. 直接加
# 导入需要的模块
from glob import glob
from PIL import Image
import os
from PIL import Image
import numpy as np
import cv2
import matplotlib.image
img_path = glob("F:/1/11/l/*.bmp")
# 存储(输出)路径
path_save = "F:/1/xiugai_L/"
import matplotlib.pyplot as plt
for i, file in enumerate(img_path):
name = os.path.join(path_save, "{:0>5d}_L.bmp".format(i))
img = np.array(Image.open(file))
if img.shape[0]==359:
#print(type(img))
a = np.zeros((1, 360