前言 记录一下实验过程用到的代码,此代码功能为将BGR转为RGB图像。使用方法如下: 修改img_path(输入图像路径)与save_path(输出图像路径)即可。 import os from tqdm import tqdm import cv2 img_path = r'E:/SR10.30' #输入图像路径 save_path = r'E:/SR_RGB/' # 输出图像路径 dirs = os.listdir(img_path) for img in tqdm