拉普拉斯线性锐化滤波 LaplacianCalculates the Laplacian of an image.C++: void Laplacian(InputArray src, OutputArray dst, int ddepth, int ksize=1, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )P...
分类:
编程语言 时间:
2014-07-28 00:05:59
阅读次数:
393
sobel非线性滤波,采用梯度模的近似方式 SobelCalculates the first, second, third, or mixed image derivatives using an extended Sobel operator.C++: void Sobel(InputArray src, OutputArray dst, int ddepth, int dx, int dy,...
分类:
编程语言 时间:
2014-07-28 00:04:30
阅读次数:
481
Kivy是面向触屏设备的,对键盘,遥控器等输入设备的处理比较弱,但是有时候我们又需要实现对按键的处理,如通过方向键切换焦点,这篇文章来讨论下如何去实现。...
分类:
其他好文 时间:
2014-07-27 23:54:40
阅读次数:
410
1. 如果不知道dict中是否有key的值,那么最好用dict.get(key)
如果用dict[key]这个读取会报KeyError异常,
dict.get方法主要是提供一个取不到对应key的value就返回默认值的功能,
而dict[key]实际上是调用了__getitem__方法...
分类:
编程语言 时间:
2014-07-27 23:46:59
阅读次数:
312
官方资料:http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-unix
还有一个值得参考的mysql安装,与python-mysql安装博客http://hearrain.com/2011/01/498
据官方文档说,
For example, if you r...
分类:
数据库 时间:
2014-07-27 23:37:59
阅读次数:
295
import java.util.Queue;import java.util.concurrent.LinkedBlockingQueue;public class Consumer extends Thread { private String product; private Queue st...
分类:
编程语言 时间:
2014-07-27 23:25:39
阅读次数:
258
state-machine environmentobject-oriente interfacefigure and axesbackend and frontenduser interface bankendshardcopy backends or non-interactive backen...
分类:
编程语言 时间:
2014-07-27 23:25:29
阅读次数:
283
之前总是运行的python manage.py runserver,用默认的在本机访问的127.0.0.1:8000,如果跟几个同学一起去开发一个网站来玩玩的话,可以这样:python manage.py runserver (your ip):(your port),指定你的ip和port,则局域...
分类:
Web程序 时间:
2014-07-27 23:24:29
阅读次数:
291
1. 反斜杠的困扰(The Backslash) 有时候需要匹配的文本带有'\',如'\python',因为正则表达式有些特殊字符有特殊意义,所以需要前面加上'\'来消除特殊意义,这里匹配的正则表达式是'\\python',这时候如果要编译这个正则表达式需要re.compile('\\\\pyth....
分类:
编程语言 时间:
2014-07-27 23:09:09
阅读次数:
308
1.open使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。file_object = open('thefile.txt')try: all_the_text = file_object.read( )finally: f...
分类:
编程语言 时间:
2014-07-27 22:58:39
阅读次数:
221