python 图片io操作方法
作者:互联网
python 图片io操作方法
opencv
import cv2
im = cv2.imread('')
skimage:skimage.io.imread
from skimage import io
from skimage import color
im = io.imread('1.jpg')
skimage.color.rgb2grey(rgb)
skimage.color.rgb2hsv(rgb)
skimage.color.rgb2lab(rgb)
skimage.color.gray2rgb(image)
skimage.color.hsv2rgb(hsv)
skimage.color.lab2rgb(lab)
caffe
caffe.io.load_image()
caffe.io.resize()
imageio
import imageio
im = imageio.imread('1.jpg')
imageio.imsave('2.png',im)
scipy
from scipy import misc
im = misc.imread('1.jpg') # 接口被抛弃 ,一直imageio.imread/imwrite
misc.imsave('misc1.png',im)
PIL
from PIL import Image
im = Image.open('1.jpg')
标签:python,操作方法,color,im,io,imread,import,skimage 来源: https://www.cnblogs.com/xikeguanyu/p/15755637.html