文件夹中含有子文件夹,修改子文件夹中的图像存储格式,把png图像改为jpg图像,python代码如下: import os import cv2 filePath = 'C:\\Users\\admin\\Desktop\\img' for dirpath, dirnames, filenames in os.walk(filePath): path = [os.path.join(dirpath, names) for names in filenames] for str in path:…