import matplotlib.pyplot as plt
from matplotlib.image import imread
img = imread('E:/FILE/Python/python_machine learning/practice/ch01/picture.jpg')
plt.imshow(img)
plt.show
错误代码?
同时读取多张图像
import matplotlib.pyplot as plt from matplotlib.image import imread
img1 = imread('E:/FILE/Python/python_machine learning/practice/ch01/picture1.jpg') img2 = imread('E:/FILE/Python/python_machine learning/practice/ch01/picture2.jpg') img3 = imread('E:/FILE/Python/python_machine learning/practice/ch01/picture3.jpg')
plt.imshow(img1) plt.imshow(img2) plt.imshow(img3)
plt.show()