yyyyyyyyyyyyyyyyyyyy

博客园 首页 新随笔 联系 订阅 管理

2015年8月6日 #

摘要: html = data.decode('gbk').encode('utf-8')此处encode编码要与html文件内charset=utf-8的格式一致,如果不一致,浏览器打开乱码,文本编辑器正常。 阅读全文
posted @ 2015-08-06 17:37 xxxxxxxx1x2xxxxxxx 阅读(1065) 评论(0) 推荐(0)

摘要: 介绍本文将介绍如何编写一个只有200行的Python脚本,为两张肖像照上人物的“换脸”。这个过程可分为四步:检测面部标记。旋转、缩放和转换第二张图像,使之与第一张图像相适应。调整第二张图像的色彩平衡,使之与第一个相匹配。把第二张图像的特性混合在第一张图像中。完整的源代码可以从这里下载: https:... 阅读全文
posted @ 2015-08-06 01:10 xxxxxxxx1x2xxxxxxx 阅读(504) 评论(0) 推荐(0)

摘要: No module named cv2 阅读全文
posted @ 2015-08-06 01:09 xxxxxxxx1x2xxxxxxx 阅读(149) 评论(0) 推荐(0)

摘要: 安装cv2http://hyry.dip.jp/files/opencv.zip采用cv2重写的《Python科学计算》中的实例程序读者可以在下面的页面中搜索“opencv”,并根据Python版本下载对应的安装程序。http://www.lfd.uci.edu/~gohlke/pythonlibs... 阅读全文
posted @ 2015-08-06 01:01 xxxxxxxx1x2xxxxxxx 阅读(1072) 评论(0) 推荐(0)

摘要: OpenCV之Python学习笔记 直都在用Python+OpenCV做一些算法的原型。本来想留下发布一些文章的,可是整理一下就有点无奈了,都是写零散不成系统的小片段。现在看 到一本国外的新书《OpenCV Computer Vision with Python》,于是就看一遍,顺便把自己掌握的东西 阅读全文
posted @ 2015-08-06 00:59 xxxxxxxx1x2xxxxxxx 阅读(768) 评论(0) 推荐(0)

摘要: $cd numpy $ sudo python setup.py build $ sudo python setup.py installRunning from numpy source directory.Cythonizing sourcesnumpy/random/mtrand/mtrand 阅读全文
posted @ 2015-08-06 00:48 xxxxxxxx1x2xxxxxxx 阅读(243) 评论(0) 推荐(0)

摘要: python及相关工具安装Error集 1. 如果升级python版本中出现error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or direc 阅读全文
posted @ 2015-08-06 00:40 xxxxxxxx1x2xxxxxxx 阅读(489) 评论(0) 推荐(0)

摘要: 1.安装http://cython.org/release/Cython-0.22.1.tar.gzpython setup.py install2.写测试代码:zhouhh@zhouhh-home:~$ vi test.pyx[python] view plaincopy def sayhe... 阅读全文
posted @ 2015-08-06 00:27 xxxxxxxx1x2xxxxxxx 阅读(534) 评论(0) 推荐(0)