图像轮廓个直方图-(Python)
2016-04-29 15:03
405 查看
from PIL import Image
from pylab import *
im = array(Image.open(‘2015.jpg’).convert(‘L’))#灰度化
figure()
gray()
contour(im,origin=’image’)
axis(‘equal’)
axis(‘off’)
figure()
hist(im.flatten(),1024)
show()
from pylab import *
im = array(Image.open(‘2015.jpg’).convert(‘L’))#灰度化
figure()
gray()
contour(im,origin=’image’)
axis(‘equal’)
axis(‘off’)
figure()
hist(im.flatten(),1024)
show()
相关文章推荐
- Python+Opencv识别两张相似图片
- python的可变和不可变对象
- Windows下为Python编译C扩展模块
- 【转载】Python练习册,每天一个小程序
- python多线程thread
- Android自动化测试MonkeyRunner(三)------python基本语法
- 使用python将自己的图片数据集准换成为cnn的数据集
- 使用python和android模拟器做android程序的自动化测试
- python中使用pickle进行序列化
- Python(1)--输入输出
- Python技巧(二)
- [python]fabric实现远程操作和部署
- Python itertools 模块 列表元素 字符串 反向遍历合并
- python中使用字符串前面加r
- ubuntu下python环境变量配置以及将模块放入正确位置
- [python]join函数操作字符串
- 史上最快python 异步消息队列zeromq 简介
- 使用Python进行多进程编程
- Python实现包含min函数的栈
- Python爬虫实战:百度贴吧—妈妈吧