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()运行结果:
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()运行结果:
相关文章推荐
- 演示如何实现Matplotlib绘图并保存图像但不显示图形的方法
- 【matplotlib】matplotlib画图,读取图像
- 演示如何实现Matplotlib绘图并保存图像但不显示图形的方法
- Linux下python matplotlib.pyplot在图像上显示中文的问题
- 图像显示—关于matplotlib.pyplot.imshow()函数
- Python使用matplotlib实现的图像读取、切割裁剪功能示例
- python opencv 使用 Matplotlib显示图像
- [置顶] 【python 图像切割】matplotlib读取图像,裁剪图像
- python matplotlib 显示图像
- [python] Kmeans文本聚类算法+PAC降维+Matplotlib显示聚类图像
- matplotlib.pyplot与cv2、Image.open 读取图片显示的差异
- python实现Kmeans文本聚类,通过PCA降维和Matplotlib显示聚类3d三维图像
- Linux下python matplotlib.pyplot在图像上显示中文的问题
- Pycharm Matplotlib 图像不显示问题
- Pycharm Matplotlib 图像无法显示问题
- 使用matplotlib时pyplot.show()不显示图像的问题
- Numpy、matplotlib实现二维数据到图像的转换,添加colormap,无边距显示
- matplotlib不能正常显示图像
- 为什么matplotlib显示opencv图像不正常
- wxpython和matplotlib显示图像的一个例子