filter2DConvolves an image with the kernel.C++: void filter2D(InputArray src, OutputArray dst, int ddepth, InputArraykernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT )P...
分类:
编程语言 时间:
2014-07-28 00:24:39
阅读次数:
294
拉普拉斯算子进行二维卷积计算# -*- coding: utf-8 -*-
#线性锐化滤波-拉普拉斯算子进行二维卷积计算
#code:myhaspl@myhaspl.com
import cv2
import numpy as np
from scipy import signal
fn="test6.jpg"
myimg=cv2.imread(fn)
img=cv2.cvtColor(my...
分类:
编程语言 时间:
2014-07-28 00:23:31
阅读次数:
419
python中的装饰器可以装饰函数,也可以装饰类,功能是向函数或者类添加一些功能。类似于设计模式中的装饰模式,它可以把装饰器的功能实现部分和装饰部分分开,避免类中或者函数中冗余的代码。
装饰器装饰函数:
def decrator(f1):
def newf():
print "strings will be connected:"
print f1();
return newf;...
分类:
编程语言 时间:
2014-07-28 00:21:15
阅读次数:
299
拉普拉斯线性锐化滤波 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
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