imgpath = '2968538221504814A.jpg'
1 matplotlib
import matplotlib.pyplot as plt # 導入matplotlib庫
img = plt.imread(imgpath)
2 PIL(pillow)
from PIL import Image # 導入PIL庫
img = Image.open(imgpath)
3 cv2
import cv2 # 導入OpenCV庫
img = cv2.imread(imgpath)
4 skimage
from skimage import io #導入skimage庫
img = io.imread(imgpath)
5 imageio
import imageio #導入imageio庫
img = imageio.imread(imgpath)