plt.imshow 图像读取,展示

1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
from scipy import misc
face = misc.face()
misc.imsave('face.png', face) # First we need to create the PNG file
face = misc.imread('face.png')
print type(face)
print face.shape,face.dtype
plt.imshow(face)
plt.show()

Be the first to comment

Leave a Reply

Your email address will not be published.