您的位置:首页 > 编程语言 > PHP开发

skimage读取图像——matplotlib显示图像

2018-01-26 16:55 567 查看
# -*- coding: UTF-8 -*-

from skimage import io
import matplotlib.pyplot as plt

img=io.imread('d:/q.png')

size = img.shape
print 'size of image', size

plt.figure(0)
plt.imshow(img)

print 'Good bye'

# the program will stop when comes to plt.show(), and plot
# the code after plt.show() will not be executed, until we close the plot windows
# so, I put plt.show() at last
plt.show()运行结果:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: