python
yanxiaopan
这个作者很懒,什么都没留下…
展开
-
python中元组的常用方法
#元组和列表十分相似,元组和字符串一样都是不可变的。 #元组由不同的元素组成,每个元素可以存储不同类型的数据,例如 #字符串、数字和元组 #元组通常代表一行数据,而元组中的元素则代表不同的数据项 #创建元组,不定长,但一旦创建后则不能修改长度 #空元组 tuple_name = () #如果创建的元组只有一个元转载 2015-12-31 22:14:43 · 865 阅读 · 0 评论 -
python 调用图像处理类库PIL 时遇到的问题
1.原来安装了python3.4.3并下载了Python Imaging Library 1.1.7 Source Kit (http://www.pythonware.com/products/pil/),无法导入Image module,在python中运行 from PIL import Image 时报错。 解决方法:发现是语法错误,python3.x版本和python2.x版本有很多语法原创 2016-06-21 22:39:34 · 1830 阅读 · 0 评论 -
python-scipy 图像处理
from PIL import Image from numpy import * from scipy.ndimage import filters读入图像并转化成灰度图像im=array(Image.open(‘lena.jpg’).convert(‘L’))高斯滤波im2=filters.gaussian_filter(im,5) img=Image.fromarray(im) img原创 2016-06-25 17:36:36 · 2518 阅读 · 0 评论 -
python-PIL 图像基本操作
from PIL import Image 打开并显示一幅图像 im=Image.open(‘lena.jpg’) im.show() 转换成灰度图像 img=im.convert(‘L’) img.show() 创建缩略图 im.thumb原创 2016-06-25 17:11:10 · 675 阅读 · 0 评论 -
python-numpy、scipy
对于window64 ,python2.7 1.在此链接下下载了numpy-1.11.0+mkl-cp27-cp27m-win_amd64.whl及scipy-0.17.1-cp27-cp27m-win_amd64.whl。(http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy) 2.根据此链接下的说明文档成功的安装了numpy和scipy。(http原创 2016-06-25 14:04:19 · 576 阅读 · 0 评论 -
python 中模块的使用
http://www.runoob.com/python/python-modules.html转载 2016-01-01 17:49:43 · 289 阅读 · 0 评论 -
python中函数的使用
http://www.runoob.com/python/python-functions.html转载 2016-01-01 17:19:34 · 327 阅读 · 0 评论 -
python中的条件选择语句和循环语句
http://www.cnblogs.com/dolphin0520/archive/2013/03/13/2954682.html转载 2016-01-01 17:18:36 · 594 阅读 · 0 评论 -
python中的条件选择语句和循环语句
http://www.cnblogs.com/dolphin0520/archive/2013/03/13/2954682.html转载 2016-01-01 13:26:22 · 796 阅读 · 0 评论 -
python 中列表、元组、字典、文件的区别
http://blog.chinaunix.net/uid-24399976-id-3058585.html转载 2016-01-01 13:15:05 · 419 阅读 · 0 评论 -
python字典的常用方法
http://www.jb51.net/article/64822.htm http://blog.sina.com.cn/s/blog_5c6760940100bmg5.html转载 2016-01-01 12:26:15 · 414 阅读 · 0 评论 -
python中列表的常用方法
http://blog.csdn.net/kikitamoon/article/details/46785681转载 2016-01-01 12:04:07 · 329 阅读 · 0 评论 -
python语法总结
在python 中,字符串是一种变量,输入字符串必须加引号,单引号、双引号及三引号等价。若需打印出引号,需在前加转义字符(\)。利用三引号可以输入多行文本。利用换行符号(\n)可以在多行打印文本。print()函数串联两种字符的方法: 字符串格式说明符:%s python 提供了三种类型的数值:整型、浮点型和虚数。通过type()函数可查看数据的类型。内置函数str()可以将数值转换成字原创 2015-12-31 22:22:27 · 392 阅读 · 0 评论 -
用python做图像处理遇到的问题1
1.遇到的第一个问题就是选择哪个图像库的问题,通过调研,发现用的比较多的库有:opencv ; PIL(pillow) ; matplotlib ; scikit-image 简称skimage因为用的是anaconda2 spyder(python2.7) ,后三个库都配置好了;参考:https://blog.csdn.net/qq_36941368/artic...原创 2019-02-18 14:35:46 · 582 阅读 · 0 评论