python显示图片两种方法
1.利用Pillow包
未安装的可以通过pip install Pillow安装
from PIL import Image img = Image.open('notMNIST_large/A/aGFua28udHRm.png') img.show()
显示的图片如下:
2.利用matplotlib
同样可以通过pip进行安装
from PIL import Image import matplotlib.pyplot as
未安装的可以通过pip install Pillow安装
from PIL import Image img = Image.open('notMNIST_large/A/aGFua28udHRm.png') img.show()
显示的图片如下:
同样可以通过pip进行安装
from PIL import Image import matplotlib.pyplot as