import os
import cv2
import math
from math import sqrt
import numpy
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import openpyxl
from PIL import Image
import matplotlib.image as mpimg
#文件夹路径
folder_path = 'C:/Tianyu/AAV/cut_imgs_partial'
for filename in os.listdir(folder_path):
# 读取每张图像
# img_1 = cv2.imread(img_path)
# 保存图像
# save_path = f'{filename}.jpg'
# cv2.waitKey(0)
# cv2.destroyAllWindows()
Python 遍历文件夹中所有图片文件
于 2024-01-16 10:15:08 首次发布