![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python学习
lee_4
这个作者很懒,什么都没留下…
展开
-
python opencv warpAffine
在对图像进行平移的时候,要求平移矩阵的格式32float,所以创建矩阵时候应该用np.float32,而不能用np.array翻译 2015-01-29 10:58:15 · 851 阅读 · 0 评论 -
TextMate无法识别中文的解决方法
文件头部加一行代码 # coding=utf-8原创 2014-12-08 21:03:07 · 1204 阅读 · 0 评论 -
Mac python 无法安装PIL
先安装pip。方法:sudo easy_install pip然后用pillow代替pil安装方法:sudo pip install pillow在需要import Image,ImageDraw的地方用from PIL import Image,ImageDraw原创 2015-01-16 14:10:57 · 669 阅读 · 0 评论 -
Mac python opencv 安装
1、安装homebrew 地址为 http://brew.sh/index_zh-cn.html2、安装cmake。输入brew update,然后输入brew upgrade。之后输入brew install cmake。可能会出现Error: Permission denied的报错。这是由于权限的问题。需要把文件夹的权限改一下。3、下载opencv for Mac的源码。将源码解压后原创 2015-01-19 17:32:00 · 766 阅读 · 0 评论 -
Sublime Text 无法使用 input raw_input 的解决方法
首先安装SublimeREPL,然后修改Preference->Key Bindings-User 把下面这段话copy进去[ {"keys":["ctrl+r"] , "caption": "SublimeREPL: Python - RUN current file", "command": "run_existing_window_command",翻译 2015-09-09 11:31:48 · 4153 阅读 · 0 评论 -
'utf8' codec can't decode bytes 解决方法
代码前加import sysreload(sys)sys.setdefaultencoding('utf-8')转载 2015-09-11 17:20:29 · 4786 阅读 · 0 评论