Esempio n. 1
0
def _atilda0(coefs):
    from imfun.fnutils import take, fniter
    kernels = take(len(coefs), fniter(atrous.zupsample, _phi2d_))
    out = np.zeros(coefs[0].shape)
    for j, c in enumerate(coefs):
        if j > 0:
            x = atrous.signal.convolve2d(c, kernels[j - 1], **c2dkw)
        else:
            x = c
        out += x
    return out
Esempio n. 2
0
def _atilda1(coefs):
    from imfun.fnutils import take, fniter
    kernels = take(len(coefs), fniter(atrous.zupsample, _phi2d_))
    out = np.zeros(coefs[0].shape)

    for j, c in enumerate(coefs[:-1]):
        if j > 0:
            kern = atrous.signal.convolve2d(kernels[j - 1], kern_prev, **c2dkw)
            kern_prev = kern
        else:
            kern = kernels[1]
            kern_prev = kern
        x = atrous.signal.convolve2d(c, kern, **c2dkw)
        out += x
    return out