Python中常用图像处理库
- skimage
# install
pip install scikit-image
from skimage import io, data
# import camera.png from data directory
data.camera()
from skimage import data_dir
print(data_dir)
# io
io.imread('camera.png', as_grey=True)
im.imshow(...)
- opencv
# install
pip install opencv-python
import cv2;
cv2.imread('camera.png')
- PIL (Python Imaging Library)
from PIL import Image
- Pillow
from skimage import io, data
import matplotlib
cam = data.camera()
io.imshow(cam)
print(cam.shape)
网友评论