Example #1
0
def gausskern1d(sigma,size):
    k = size/2
    x = float32(arange(-k,k+1))
    kern = npdf(0,sigma,x)
    return kern / sum(kern)
Example #2
0
 def objective(theta):
     (sigma,scale,dc) = theta
     z = npdf(0,sigma,X)*scale+dc
     error = sum( (z-Y)**2 )
     return error
Example #3
0
def gausskern2d(sigma,size):
    k = size/2
    x = float32(arange(-k,k+1))
    p = npdf(0,sigma,x)
    kern = outer(p,p)
    return kern / sum(kern)