做项目遇到的问题-----转图片格式Python

import os 
import tensorflow as tf 
from PIL import Image  #注意Image,后面会用到
import matplotlib.pyplot as plt 
import numpy as np
import cv2

outfile='D:\\silei\\image.jpg'#转成jpg格式的
img=Image.open('01-00001-0000.bmp')#我的样本数据是bmp格式的,
img.save(outfile)
简单的例子。成批的处理,需要用到OS模块。如果需要会在写得

猜你喜欢

转载自blog.csdn.net/zhouguangfei0717/article/details/80390978
今日推荐